In addition to what others have said, in theory it's also a way to call public attention to the problem. These are coveted positions that people don't just walk away from lightly, so someone in this position stepping down and explaining why can serve as an alarm bell.
That said, I don't know how effective that really is anymore since driving people out is one of the administration's stated goals.