Most songs in major use the major scale, but I keep seeing guitarists play the pentatonic scale in many vids. It's just a subset of the major scale. So why is it so important and what is it used for?
The pentatonic scale(s) leave out two important notes. The major pentatonic uses, in key C, C, D, E, G and A. Missing notes are F and B. They themselves are a tritone apart. The tritone itsellf is deemed to be a dissonant interval. The other 5 blend better with each other - let's face it, 3 of them constitute the major triad in that key! So in any order, those 5 notes will sound cohesive.
The same applies to the minor pentatonic scale notes. In key Am this time. Funnily enough they're the exact same notes as those mentioned in key C. So the same idea applies.
You really need to include tag 'guitar' in the question - as that's partly what you ask. And one main reason why guitarists love to use it is that the way standard guitars are tuned, the notes across two octaves (and a 3rd) are found in a very simple pattern across the strings, within 3 frets of each other. Both maj. pent and min. pent. They just happen to be the same pattern for any major and its relative minor.
It was established a long time ago that the min. pent. notes happen to sound quite effective over major or seventh chords - as found in blues and jazz. So guitarists latched on to it all, and it's probably the one thing that most guitarists like doing - widdling on min. pents.
Better players will use the notes from min. and maj. pents. More knowledgable ones will then have added use in some circumstances of the ♭5 in min. pent. (or ♭3 in maj. pent.) to produce notes from the two blues scales.
And stating that it's just a subset of the major scale, as you can now appreciate, is only half the story!