I just want to mention, for anyone who isn't in management or dealt much with HR and budgeting, that firing and then replacing staff is extremely expensive. I know that the big corporations want to give the impression that everyone is an easily replaceable cog that can be swapped out at a whim, but even McDonald's takes a meaningful (to them) hit whenever they replace a fry cook. The termination process itself can be costly, (in union and white collar jobs especially), right at the get go. You're writing off all the time and money spent on recruiting them in the first place, on boarding them, the training time you spent to get that employee up to speed, all that is tossed in the trash, plus now you have to process them out correctly or you risk lawsuits and more money getting drained. Now you're taking a hit in productivity and morale, and while that is happening you're going to be pulling that manager away from his workgroup because you have to find a replacement. Depending on the industry, those costs are going to be significant from paying for headhunters and job boards just to get resumes in, then you need to process and narrow them down, then do however many rounds of interviews. Add up the man-hours between HR (troon hours) and management, combine all those costs, add in background checks, travel expenses, and other paperwork costs. Assuming you find someone, congrats! Now you have to spend the same amount or more that you threw away in the firing to on-board and train the new guy! And until they are trained and effective your workgroup is under-performing and over stressed. Good job!
That's just the corporate world, now add in the additional bullshit in firing a military officer. Jack up all the costs by about 10 (government budgets lol), add in the sunk costs from the millions spent training him, the lost value of any experience he had, the money spent to keep his security clearance, etc. Factor in the morale and performance losses, multiply those by 10 and then add a heaping helping of political humiliation as as officer is paraded in chains on worldwide media. Oh, and don't forget the money you'll need to spend on a surveillance program to keep eyes on your now disgruntled officer full of sensitive secrets in his brain.
All of this to say that mandates and purges are expensive as fuck for both civilian companies and especially the military.