There's tons of people that don't follow the boss's orders to a T and don't resign and don't get fired. And they would be much less effective at enacting their boss's agenda than someone who "just followed orders"
OK, but isn't getting fired better than resigning? Why resign?
I can't speak for the NSF director, but the silver lining in a resignation is you leave on your own terms. Being fired is not "better" for everyone.