For example, type 1 diabetes occurs when the immune system attacks and kills beta cells in the pancreas. This is relatively common.
What makes beta cells more likely to be targeted than, say, alpha cells in the pancreas?
Autoimmune reactions each have their target antigens. They'll "attack" wherever those antigens are expressed. In the case of Type 1 diabetes, many specific antigens have been identified, and they all correspond to regions on the surface of pancreatic islet β cells. Ultimately, however, the immune reaction is targeting proinsulin and its processed product insulin, which are produced by solely by β cells. This is an interesting review covering the topic.