So a non-profit can absolute invest in or own a for-profit subsidary. This is extremely common. The idea is that the for-profit returns will flow back to the non-profit and remain dedicated to the non-profit mission.
Where things get really shady and run the risk of IRS violations is when the leadership of the non-profit has a seperate for profit stake in the subsidary.
When your public position is that you don't own equity in the company it implies that you aren't making money off of it. However if you have all sorts of side deals through intermediaries and you are making money off the entity it looks quite bad.