IANAL but executive retainers do tend to have some protections precisely for thus reason. You don't want a shift in presidency and then for them to hollow out 4+ years of tenure to advance their agenda. There needs to be some non-partisanship so the sceicne isn't bogged down by beuracracy.
At the bare minumum, most government workers get due notice of their termination. The federal government is for the most part not at-will.