> Caring about certain groups of people more than others is clearly immoral.

I don't think it's so clear. That's a bold statement.

First of all, it's obvious that most people care about themselves, their family, their friends, their local community, their online community, etc. more than random people. This is evidenced by thinking of "caring for" people in terms of actions, rather than "caring about" abstract virtues. I care "for" someone by helping them, spending time with them, and by giving to them. I care "about" people in an abstract sense, perhaps by posting or speaking about it, "hope and prayers", taking a moral stand to defend their rights, etc. but not by doing concrete actions for individuals.

I, and most other people (and this almost certainly includes you!) care for those close to us more than we do for those further away, in every sense, because it's what we're more capable of doing meaningfully. So, from a practical standpoint, we're always going to care about certain groups more, purely because we don't actually have the power to care for people that are beyond our reach. The memberships of those groups obviously vary considerably from person to person, but to really care for someone takes time and effort, and we can only give so much.

Second, we have to consider what "moral" means. Arguably, the only morality is civilization; from a game-theoretical standpoint, the most moral actions are those which allow your society and people to thrive, those which allow your genes to propagate. This is how one obeys the genetic imperative, and how one continues to win in the fundamental struggle against nature that life is and has always been. This is what is reflected in the commonalities in law and ethics between all civilizations that have persisted for any length of time. These laws reflect moral values; the moral values reflect evolution, in the sense that if you have self-destructive morals you will not survive long enough to propagate them for a long time.

To maximize this morality, balanced with the capability factor above, one's care for others drops off as some function of the social distance from one's self to others, defined by one's relationships and by the customs of one's society. You help the people you know; you help the people who would help you. Whether this is because of a higher moral precept like the Golden Rule or out of shrewd self-interest doesn't matter - the ideal moral Schelling point is the combination of those two things, after all.

The term "pathological altruism" has been used of late to describe those who expend their resources to help others in ways that damage themselves or their society. For example, if you expend all of your charitable donations and volunteer time helping people who are far away and have no bearing on your own existence one way or the other, there's a huge opportunity cost in comparison to helping the people around you. This is especially salient when there is a disparity, in the sense that nobody from far away is donating to help those close to you either. This results in situations like those in America where homeless veterans, opiate addicts, underprivileged children, etc. are a persistent issue but no matter, because you can get just as much social clout or more from donating to help people halfway around the planet (gladdening many middlemen in the process).

From this perspective, I think it's fair to say that it's plenty moral to care more about certain groups than others. It may even be more moral. Take the log out of your own eye, and so forth.

> When your resources can be used much more effectively wasting them is immoral.

It's very hard to know what is the most effective thing, and so hinging morality on the idea that there's some lower-energy-state solution somewhere else that we didn't find is a bit questionable. It's not like we all have access to CPLEX or a BQM solver with details on every potential outcome for every situation we're in.

The definition of "effective" is also relative. What if I believe it is more "effective" in reality for those I care about to use my resources as described above, to help people whom I can make a real lasting difference for, rather than expending money abstractly helping people I will never meet? Which one is more likely to start a feedback cycle that pushes things upward in my community? Which one is more likely to benefit my descendants generationally, assuming we stay in this area?

Ehh. I don't think you even believe your own point, to be honest.