Yes, because it’s both easier and faster. Our tendency to generalize evolved from the need to quickly assess new situations based on similar past experiences. That ability carried a certain survival benefit, even though the conclusions drawn by generalizations and stereotypes aren’t very reliable.
We’ve also evolved higher cognitive functions that are capable of more accurately assessing individual situations and drawing more nuanced and reliable conclusions. But these processes take time and mental energy, resources that many of us are loathe to invest.
All of us use stereotyping, if only at a subconscious level. Those ancient mental functions will always be with us. The question becomes whether or not we understand the inherent flaws in those functions and bring our more evolved functions to bear.