On one level, they are a technical exercise – something to get your pick and fingering coordinated. Done correctly, they should reinforce your knowledge of notes on the fingerboard. Being a physical exercise, they should also help you to develop speed, strength and endurance.
Most people use scales to develop their lead guitar ability. Lead players have to play themes and they have to take solos. In both cases, scales are at the root of each of these skills. Look at the lead riff from “Purple Haze” – Blues Scale, “Pretty Woman” – Mixolydian Scale, “Smoke on the Water” – Blues Scale, “My Girl” – Pentatonic Scale, “Moon Dance” – Dorian Scale etc. Jazz also relies on scales for themes. Bobby Timmon’s “Moanin’” and Wes Montgomery’s “Full House- Blues Scales etc.
Guitar scales are often learned through tab although it’s not the best way to learn them. The best way is to understand the step relationships between notes, learn the notes on the fingerboard and then learn connective fingering techniques.
Which scales you should learn has a lot to do with the style of music you play. Country, Southern Rock and Bluegrass favor the Pentatonic and Major scales. Blues will use both the Blues scale and the Pentatonic scale. Reggae often uses the Major and the Natural Minor scales. Jazz without question uses the greatest variety and diversity of scales. Exotic music such as Indian, Japanese, Middle Eastern, Spanish etc uses scales that are not typically used in contemporary music. This encompasses a field called ethnomusicology.
There are many scale sources on the Internet. From dictionaries to articles to websites, there is no shortage of information on scales. What is short is how to use them and how to finger them. These are specialized studies and can benefit from formal private guitar study.
There is lot of information available that is just plain wrong so try to consult a legit expert on the subject. Don’t assume that the information is correct because it’s in a guitar magazine. Magazines are notorious for featuring well know players who can’t teach. They often have a very fuzzy idea of what they’re doing and what to call certain scales, chords and techniques.