Not-for profit companies have profit, they just redistribute the profits at the end. Any company that never has profit is doomed to fail.
Although nominally non-profits such corporations are fairly indistinguishable from partnerships.
(Although "non-profit" is the common name, in this sense it's better to think of it as shorthand for "not for profit", meaning that achieving financial profits for its owners/insiders is not its legal purpose.)
See also: https://www.nolo.com/legal-encyclopedia/taxes-nonprofit-corp...