The truth is looks matter, they always have and they always will. The problem with some people is that looks are only one piece of the puzzle. The idea of beauty has been simplified to looks in our society. The prettiest girl in the world can be the ugliest with a bad attitude and bad personality. I think a lot of times people put so much work into what other people see on the outside, and they neglect what's on the inside. That's why you see a lot of girls posting things like, I am pretty, why don't guys like me. Well maybe you are a b**ch, or shallow and you offer nothing more than a pretty face. I have always felt that the most successful people take care of not only their appearance, but who they are on the inside.
I think it is better for someone to be a little bit vain then self hating.
It's important to love who you are and looks are part of that. Also I'm assuming since your under 18 you mean mostly teenagers being vain and teenagers are renowned for being too much in their own heads and most of them swing from vanity to self hatred ( hormones and just getting accustomed to their changing appearance mebe?).
Also when you are a teenager looks really do matter quite a bit lad, unalterable fact.
Simply because looks matter. Even in a non superfical world, looks are important. In the non superficial world criteria moves from "non-understood attraction" (e.g. what a nice body) to making logical conclusions about a persons sitability based on observations of how they take care of themselves.
So people are vain because they are intelligent. Vanity can be a profitable reflection of your own personality. It can also though show people that ALL you care about are your looks (it needs to be combined with other traits).
So, in summary, people are vain because its sensible to look after yourself and your looks. People are SO vain usually when other people have made them feel bad about themselves in the past and they want to feel as good as possible in the future.