Foundations of course, can invest in for profit companies, whose goal it is to generate returns for the foundation.
Foundation -> invests in a holding/investment company -> invests in a property company -> invests in a special purpose vehicle that owns a $100m NYC penthouse. Check.
Check out Ikea; it's a non profit.