Self-deception as a program?

Already in our fairy tales and myths the good ones are beautiful and the ugly ones mean. But how did the good enter the formula of beauty? Have we been born with this paradoxical program? Have we taken over the stereotype from our parents? From the media? Does it make any evolutionary sense? Can one do anything against this annoying reflex? Do we need a new kind of affirmative action to protect those less favoured by nature?