Halo Effect The halo effect is a cognitive bias in which an initial positive impression unconsciously influences judgments of other, unrelated traits. One example is that while the appearance of a person often has little to do with how they do things, tidy people are implied to be more reliable or hard-working.
I think this is because your brain is trying to form a coherent image of something or someone. Most of the time, it's fine, but this may be the reason for implicit discrimination towards ugly people. Also see: Dangers of assuming things about others