The moves to fire or sideline generals and admirals are without precedent in recent decades and have rattled the top brass.