This is mostly just due to how nonprofits work. If you have excess revenue, you can’t return it to shareholders so you might as well spend it on mission-oriented activities.
You can do this up to a point but if it looks like you're actually making a profit it might raise questions eventually. Keeping enough to cover one year's operating costs is pretty common though.
Non-profits usually don't "compete" at least in the economic sense. They exist for a charitable purpose that isn't normally well-served by the competitive market.
First of all, charity is a christian concept that has no role in modern secular society. Anything worth doing out of the kindness of our hearts is worth doing collectively without expecting individuals do disproportionately sacrifice.
Second, of course zero-margin processes have an economic role. That is what market efficiency looks like. The entire point of competition is to produce these economic processes. The american brain can't fathom getting their money's worth lol