It's not magical, though. And it's not because the charity is "funded by tax payers".
Sometimes the salaries are discounted because the charity can find someone who "believes in the mission" (sound familiar?).
Sometimes the salaries are discounted because that's all the charity can afford. If the charity can't find someone willing to take the pay cut, then it ends up subsisting on below-average performers. See hospitals, for example. If they don't pay market rates for doctors, they probably have sub-par doctors. If your charity can't sell its mission as part of the compensation package, then it has to cough up.
The point is, no one is going to take a pay cut just because, as GP put it, they're "funded by tax payers". Why the hell would anyone take a pay cut just because their job is funded by tax payers instead of by the Gates foundation?
Actually, charity's pay people less than market rates in other positions.