There are four basic approaches to the needs of others:
1) selfishness / narcissism: this places yourself above all, full stop.
2) martyrdom: placing others over yourself in all ways, usually neglecting ones own well being.
3) egalitarian selflessness: placing the needs of others in line with your own, including people of different “groups”, whether religious, ethnic, political, or national.
4) in-group selflessness: placing the needs of others in line with your own, provided they are in-group. For out-group folks, there are two sub-categories how people of viewpoint 4) look at them:
4a) out-group individuals should have their needs considered only after the needs of the the in group folks are met
4b) out-group individuals are fully expendable for the sake of in-group individuals.
***
I suspect that most of us fall into the category of 4a, depending on how our groups are defined.
I also suspect that the big divide in the USA (and possibly other places) is WHO is considered in-group. Are Muslim citizens in-group? Are undocumented residents in-group? Are refugees in the Mediterranean in-group? Are religious minorities in Iraq and Syria in-group? Are prisoners in federal penitentiaries in-group?