They close down for many of the same reasons that any business would close their doors.
1) Run out of Money
There are a number of ways that nonprofits get funded. Some have built in revenue (selling goods or services), others have donors, and some are a hybrid of the two. Yet having revenue coming in, doesn’t mean you’re good. You need to make sure you don’t spend more then you make. There are a lot of reasons why donors might leave (I address this here Why do people stop supporting a charity?). If you run out of money, your doors close.
2) Leader Churn w/o Replacements
Going the nonprofit route can be a lonely endeavor. The need is always greater than your resources and it can cause failure to overwhelm the victories along the way. As people step down from leadership, or running a nonprofit, there might not be anyone to hand the baton to. If there wasn’t an intentional process to groom the next leader the nonprofit will have to close it’s doors.
3) Lack of Traction
Just because there is a need, and a great way to meet that need, doesn’t mean it works. The best laid plans don’t always manifest themselves as the best solutions. Sometimes it’s a lack of relationships to execute the idea, or they haven’t learn of soft/hard skills needed. For some reason the idea never quite got the traction it needed. A nonprofit could limp along for years without getting traction before being closed down.
4) Generational Stagnation
This happens when a group is so focused on it’s current membership that it fails to attract new members who are younger. The nonprofit simply ages with it’s membership and all of a sudden finds itself with an average membership age in the 60’s and minimal appeal outside of that age range. There isn’t much left to do but to wind down as the membership dies off. If there are substantial capital assets they could court a younger nonprofit in a similar space to merge together, or to gift their assets too.
While rarest of those listed, it does happen. Someone did something wrong with the money, with a person, with not a person, and it destroyed the name of nonprofit. The misdeeds of one can taint all the good work done in the name of the nonprofit. With that name drug through the local media mud there isn’t much left to do. It often leads to organizations winding down, or merging with similar nonprofits to get out from under the scandal.