That's a common misconception. Nonprofits _do_ have owners. And also, while they can't make money directly, they can spin off for-profit companies if e.g. they invent a cure for cancer or something.
They do have "stakeholders" which, naturally, can't profit from either operation or sale of the nonprofit, but, crucially, _can_ control creation of commercial spin-offs and spending. I.e. While de jure they can't be called owners, they still can (and often do) profit indirectly.
https://cullinanelaw.com/nonprofit-law-basics-who-owns-a-non...
https://www.501c3.org/who-really-owns-a-nonprofit/