Absolutely, Mozilla is another relevant example where the Mozilla Foundation is a non-profit that owns the Mozilla Corporation, which is for-profit. Furthermore many non-profits also buy shares of for-profit corporations, for example the Gates Foundation owns a large chunk of Microsoft.
You can imagine a non-profit buying enough shares of a for-profit company that it can appoint the for-profit company's board of directors, at which point it's a subsidiary.
Heck a non-profit is even allowed and encouraged to make a profit. There are certainly rules about what non-profits can and can't do, but the big rule is that a non-profit can't distribute its profits, ie. pay out a dividend. It must demonstrate that their expenditures support their tax exempt status, but the for-profit subsidiary is more than welcome to pay out dividends or engage in activities that serve private interests.
A surprising one I came across was a group of government departments that collectively controlled a "shell" government agency that ran a non-profit that owned a for-profit Pty Ltd which had over 1K staff.
It was a "legal fiction" to sidestep union rules, government employment regulations, etc...
This let them hire IT staff at market rates, because otherwise they couldn't pay them a competitive wage as normal public servants working directly for the departments.
Because most corporate investments aren't managed by complete morons.
This works when there's an obvious non-profit that has a monetizable product. The latter conflicts with the former, so it requires a disconnect. Meanwhile, if Apple tried to do the same, investors would look at that as obviously shady. In addition, non-profits are more heavily restricted by the government.
Lastly, you can't just "take the money" and "do what you want"; fraud, malfeasance, fiduciary responsibility (in the corporate entity), etc still exist. It's not some magic get out of jail free card.