Stereotypes are born out of a certain kind of truth. However, at it's base, it's a mass-generalization. In order to understand the purpose of stereotypes, you have to understand group socialization and human nature.
Stereotypes are shortcuts in the most simple form. We use them to protect ourselves and also to identify socially with one another. Which group do you belong to? What do you identify with? There's a stereotype for that out there somewhere.
The downside to stereotyping is that if taken too far in the mind of a person, it can lead to gross oversimplification of the world around them. But not every stereotype is "bad", nor are stereotypes per se "good", it largely depends on the viewer or user so to speak.
Luft has posted this before (come on Luft, can't we get a new fight going?) and I know he loves the instigation. The gut reaction of most everyone I know is to say "stereotypes are bad! I don't do that!" but then, when you sit back, you'll realize you DO do it. Ever sat in a bar or shop and seen a group of people walk in wearing flannel shirts, NASCAR caps and looking rather shoddy? You may have chuckled and said "rednecks".
Welcome to stereotyping. You do it. I do it. We all do it. And for reasons that serve a purpose. The challenge is to realize that maybe that redneck may be a nice person and helpful and you may in fact have something in common with them if you open your eyes a bit. Maybe not. But it's being open to the possibilities beyond stereotypes that matters most, not the actual stereotype itself.