In the long term we are all dead. So we have to want to do these things for people who are not born yet and who will never pay us or pay us back or be able to even thank us. We have to do these things because these things are the right thing to do.
That will decrease our wealth.
Now please explain how capitalism can do that?