Let's make the situation a little different. Could MSF pay a private surgery with investors to perform reconstruction for someone?
Could they pay the surgery to perform some amount of work they deem aligns with their charter?
Could they invest in the surgery under the condition that they have some control over the practices there? (Edit - e.g. perform Y surgeries, only perform from a set of reconstructive ones, patients need to be approved as in need by a board, etc)
Raising private investment allows a non profit to shift cost and risk to other entities.
The problem really only comes when the structure doesn't align with the intended goals - which is something distinct to the structure, just something non profits can do.
You might be able to imagine a world where there was an external company that did the same thing as for-profit OpenAI, and OpenAI nonprofit partnered with them in order to get their AI ideas implemented (for free). OpenAI nonprofit is basically getting a good deal.
MSF could similarly create an external for-profit hospital, funded by external investors. The important thing is that the nonprofit (donated, tax-free) money doesn't flow into the forprofit section.
Of course, there's a lot of sketchiness in practice, which we can see in this situation with Microsoft influencing the direction of nonprofit OpenAI even though it shouldn't be. I think there would have been real legal issues if the Microsoft deal had continued.
That's why they'll sometimes tell you to stop donating. That's here in EU at least (source is a relative who volunteers for such an org).
I am sure that is true. But the for-profit uses IP that was developed inside of the non-profit with (presumably) tax deductible donations. That IP should be valued somehow. But, as I said, I am sure they were somehow able to structure it in a way that is legal, but it has an illegal feel to it.
"Raising private investment allows a non profit to shift cost and risk to other entities."
for a suggestion of that.