It started with "predator/prey" labels, then moved to "edible/inedible," then to "friend/foe." Survival instinct. Over time, it morphed into categorizing everything to make the complex world easier to deal with.
People have a list of definitions for every category. Most people assume they can learn something about someone by putting them in categories. This is how stereotypes evolve. Both amusing and sad at the same time.
I think 'pigeon-holing' people says more about the person doing the defining than it does about the person 'defined.'