My guess is you are taking a narrower view of this than you intend? People don't necessarily take personal pride in what others have done. But identity is both personal and societal. And any accomplishment of identity is something that people are likely to feel pride in.
That is, pride is often tied to identity. And identity has a pretty wide brush.
Heck, most of us are effectively different people than we were in the past. And we very much feel some shame when we find out something bad we did back when.
Do you feel shame when you read about someone stealing a bike in a far country whose capital you wouldn’t know ? You must be in despair over all the crimes committed by humanity every hour
Do I also think it is arbitrary? Yeah. But I am also ok not feeling shame at stupid crap my immediate family has done. I just have no surprise that others do.