I believe that any technical exercise that doesn't have a concrete purpose, a purpose that can be defined and written down, is not worth it's salt. Scales are not immune to this query. It bothers me that many online guitar lesson sites as well as guitar teachers advise their students to learn exercises that have no defined goal. Many of them ask their students to learn scales right off the bat because it's "good for the fingers." I don't think this is good enough of a reason to learn scales.
Scales are also stereotypically considered to be the barometer of ability in guitar. I think also that there are more than a few people out there who are consumed with the desire to know all the scales, and are willing to show off how much they know. Keep in mind this delicious irony: There are millions of professional musicians who don't know a single scale and still make more money than a silly guitar teacher who blindly recommends every student they teach to learn scales in the first place.
If you are a beginning student, I could only think of four possible situations that might be appropriate (or perhaps evil as in the case of #4) for learning scales. Here goes:
1. Building the ability of hearing a scale
I really like the sound of Locrian. There is something about the flat second and fifth scale degrees that makes my ear go crazy. The best way to get new sounds like locrian in my ear is to play it over and over again in a technical exercise like a scale. After a little bit of time spent playing the scale, I automatically get it into my ears. If you have ever spent time learning the pentatonic scale and played a wrong note (like, "Hey that's not right. It should be..."), then you know what I am talking about. It's about being able to hum the scale.
2. Expanding the technical palette
I heard a story about Branford Marsalis, the saxophonist. There's a rumor that he spent years watching sports center and thundering through his scales. He wouldn't breath into the horn enough to make a sound, but his fingers would find the right keys to press. The result? Lightning fast scales and technique. The same can happen with guitar. Doing scales can make your hands quick.
3. Scales provide a nice safety net for soloing
Whenever I am stuck in a middle of a solo and I am not feeling any bit creative, I revert to scales. It's cheap, yeah. I wish I could be creative all the time, but it's nice that I have those there. If you want to play lead guitar, scales are really good to have at your disposal. However, if you want to play along to songs and not worry about playing single strings, there is simply no use for scales. I advise a lot of people this way. If you want to play a lot of The Beatles' songs and sing, then there is no reason why you should touch one single scale.
4. Showing off in Guitar Center
Please, if you learn scales, don't go to Guitar Center and show off. You might be impressing yourself but there is a damned good possibility you are annoying the living hell out of the people who work there. Same with people trying out guitars anywhere else in the store. Besides, there is always someone who is a better. How embarrassing would it be if they plugged into the amp next to you and out-played you?
Please, don't use scales for evil.