Paul Wolf, a real estate broker and adviser who specializes in working with nonprofits and who represented the foundation, said nonprofit groups are typically at a disadvantage in the ultracompetitive real estate market and are often outbid by private developers who can pay more to build glitzy residences. Nonprofits also often have to raise money for real estate acquisitions and get approval for such purchases from board members, making them less nimble as well.

"How do you address this issue of buying space when the market is so fast and expensive and many nonprofits can't keep up?" Wolf said. "This foundation purchased this building to give a nonprofit the chance to own it."

Read more about the deal, and its part in a larger multi-transaction process, in Crain's.