Safety needs and physiological needs are deficiency needs. They need to be met to a sufficient degree before a person can start focusing on higher needs.

The fact that it becomes harder for people to have empathy for others who are not in their own group if they feel that there is not enough to go around is also tied into this hierarchy. I’ve even seen this in non-human animals.