Like everything else in finance, they do good by making their investors money.
These investors then can use the money for fulfilling their purpose/charter/business plan.
For example, a school could use its endowment to give out scholarships, a pension fund pays out retirees, etc etc.