Every religion in the world teaches the same thing when you boil them down to base teachings
Don’t be a dick & treat others with kindness without expectation of reward.
If you’re only acting morally because of an end goal I would argue that your actions are tainted by greed.
But then you open up is a good deed bad because it was done by a bad or greedy man?