To give an extreme, hedonistic utilitarianism says it is.
I'm not that extreme, but there are limits to what I'll spend money on, in light of the opportunity cost of helping others. Sending my kid to college for the equivalent of providing full cost-of-living to a thousand people for 200 days? Gladly.
Buy a car for the same amount? No matter my income, I wouldn't do it. It's a frivolous expense in comparison.
I'm not trying to push my philosophy on anyone, but at some point, almost everyone will agree that e.g. spending a billion dollars on a party, while your home is surrounded by starving people, without thinking to help them would be crass and immoral.
- The greatest good for the greatest number, where good is defined by happiness
... by self-growth
... by adherence to a code of behavior
- Loyalty to family and country
- Improve humanity by euthanizing inferior individuals
- Save the environment from humanity
- Subjugate the environment for humanity
... and so on. Those have no logic behind them. They're just values. They're arbitrary.
Logic comes in after that, in what you do from there.