Why do people choose who to show empathy?

recently there have been a big fire in california as you all may know, a lot of people lost their homes but they were are pretty well off (from what I know) people on social media did not deliver. I saw a lot of comments bringing palestine to it, saying that people weren't so caring when it was happening in gaza, saying that its karma or straight up saying that they do not care. I don't understand why, just becuase someone is wealthy they don't deserve that. you want everyone to live good or are you just going with trends. I remember the same thing happened with ukarine, people saying they don't care because they got more media coverage. They also don't really talk about other countries/situations