do well by doing good
To achieve social or monetary success as a result of having a charitable and/or generally benevolent disposition toward others. You might earn money all on your own, but if you help others and create strong, communal bonds, you can do well by doing good.