A nonprofit business does not mean the business makes no profit.
What MMMustard said is totally correct. They essentially have to be "profitable" to remain in business.
I have had numerous nonprofits as clients and and trust me, they need to make money. Being a nonprofit in the USA is more legalistic than anything else. They have much the same business model and structure as anyone else but are supposedly operating for some "good" (Mission Statement) instead of distributing earnings to shareholders. From a practical standpoint, the term "good" can be argued to mean almost anything.
In the case of religious nonprofits, they get even more leeway since religion is mentioned in the Constitution. That's why is it so easy to legally set up your own religion and get tax-exempt status for next to nothing.