At least in the US, non-profits may make a profit, it's just that they can't have owners who receive the profits (or managers/insiders who receive undue compensation). Any profits must remain within the organization and dedicated to its mission.
(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.)
Same in France, non-profits are allowed to make profit but you can’t plan it (you’re supposed to plan that you’ll spend as much money as you receive but it doesn’t always happen) and you can’t give it to your people. (source: I run a non-profit)
(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...