I just don't understand why blood types would ever occur in the first place.

No I'm not implying you are. Blood types are just a human construct. Blood was never meant to be transfused. Blood type antigens are just like any other antigens on cells which happen to be blood cells. There are many, many antigens, some of which need to be matched for transfusion, some don't.

the sciencenews linkExactly why evolution would favor a mix of blood types in so many species is a mystery. Depending on blood type, people are more or less susceptible to particular pathogens. Type O people, for example, are more susceptible to cholera and plague, while people with type A are more susceptible to smallpox. Blood group diversity may have been maintained for so long because each version was immunologically advantageous in certain times and places.

“That diversity may have led to protection against whatever might come your way,” says glycoimmunologist Brian Cobb of Case Western Reserve University in Cleveland.

People with type A are also more prone to dangerous blood clots, Olsson says. That’s a disadvantage in the modern world, but in the days when humans and their ancestors were having babies in caves and fighting predators without the option of an emergency room, such clotting may have been beneficial.