I wonder how many of your friends would feel the same if they were working for a charity. I imagine those charity workers who earn what appears to be very good salaries could earn even more if they worked for a a non-charitable organisation.
The same sorts of comments are made about all sorts of people - even people like teachers ("what are they moaning about. They finish at 3.30 and get long holidays"), nurses, or indeed anyone who works for a public service ("gold plated pensions", "job for life", etc, etc).
This sort of talk is a delight for that very small section of society who earn millions of pounds via huge salaries and bonuses - even when their work performance has been poor. It's very useful for other, much smaller fry, to be picked on and demonised so as to take attention away from those who are really taking the lion's share.
It is possible to find information on the net re the outgoings, salaries, etc and income of various charities, to see if there is a correlation between higher rates of pay for senior officers and higher net income.
I think it is very unkind, particularly of your friends, to have joined in with the criticism. Again, I wonder if they would be so altruistic as to work for a charity and be happy to manage on a salary significantly less than they could get in a private, profit-making company. I'm sure most people would love to do meaningful work that helps people but perhaps not enough to forego a large chunk of their potential income, especially at a time when housing and other necessities are so expensive.