I've been through this as well, and it sucks. Sadly, even organizations doing societally important work can be incapable of policing their internal politics and professionalism in even a basic way.
Relatedly, it took me a while to pick up on the fact that "non-profit" does not necessarily equate to "beneficial for society". Many non-profits out there have noble purported goals, but when you actually gain some experience at them you start to realize that they are vanity projects for the wealthy.
[edit]: To clarify, I'm not making the claim that all non-profits are vanity projects, just that there are many out there that are. If you ever do want to work in the non-profit sector, doing some due diligence before applying for a job is a must (I recommend obtaining the publicly reported financial records for a non-profit in Form 990; what a non-profit's founder pays him/herself relative to the average employee speaks volumes about their moral character).
True, although using non-profits for tax evasion doesn't really work out that well if you die. iirc, HHMI was originally supposed to be a tax evasion vehicle, but started becoming a serious research venture after Howard Hughes expired.
I'm still working on accepting this.