What a major pentatonic scale is
The major pentatonic scale uses scale degrees 1, 2, 3, 5, and 6 from the major scale. In C, that is C, D, E, G, and A.
Those notes include the full major triad, so the scale sounds connected to the chord. Leaving out 4 and 7 removes the major scale tones that most strongly want to resolve, which makes the sound open and easy to phrase.