In a society with capitalism at its core, externalities exist. That's a fact that everyone agrees with. Nonprofits help mitigate those gaps. Calling all nonprofits scams is misguided at best. I think OP is looking for something more specific. What nonprofits?
To be fair, there are some good ones out there. I worked for a drug-rehab company in the 90s as the IT head that got mostly government funding for a 6 month-rehab-program for non-violent drug offenders (mostly stuff like heroine, cocaine, etc.). We also had an in-prison program but I don’t think that was as effective. Of course to get government contact money we would have to meet lots of strict guidelines too.
I definitely more wary of ones that don’t get any public funding and therefore have practically no guardrails and less forced transparency.