The question here is what is it that leads to the "protect our ingroup at any cost" behaviors to be in the majority versus the "do the right thing since that's more important than the local institution" behaviors to be in the majority.
Surely, it would be silly to lay that responsibility entirely at the feet of leadership alone, no?
If you ask a teacher under neutral conditions what would their response be to a struggling student, they would probably say to provide additional support. However, under the demands of the leadership and threat of dismissal if certain target grades aren't achieved, and when the teacher is already burnt out from the excessive workload, and has no time left for family or friends... under those conditions, in a sad reality, they celebrate the struggling students who give up. It makes their figures look better. Their performance-related pay increases. Their social time is social time, not help-Jack time. The risk of their dismissal reduces.
If you ask a doctor under neutral conditions what would their response be to having witnessed a colleague's medical mistake, they would probably say to report it immediately to a senior manager so that it can be dealt with and lessons learned. However, under the demands of the leadership and threat of dismissal for whistleblowing and under conditions of burnt out and unfair contracts (junior doctors), and having no family time... under those conditions, the sad reality is that doctors will turn a blind eye to medical mistakes. Their line managers stop threatening them with the sack, or blacklisting.
I'm not saying it applies to all institutions all of the time. But I think it is more prevalent in those institutions with the most to prove in terms of reputation. In particular, I think it applies to "outstanding" institutions. Currently I am working in a "requires improvement" secondary school. The staff and atmosphere are lovely - I wish I could stay there permanently. Contrast that with the "outstanding" sixth form college where they cheer at a failed student. That's a toxic environment I would seek to avoid. There is nothing outstanding about the place. They just chop up the student population until all that gets represented in their official figures are the high achievers. They're just a hollow banner without substance to back it up.