This is because the sacked individuals are traditionalists who despise the notion that the military has an active role to play in domestic politics. The recently fired Mark Esper took offense when Trump ordered the military to repress protesters.
I was going to say that Trump is planning ahead, sees unrest growing as he presses onward to remain in power despite losing the election, and is attempting to create a more compliant military in advance. However, that is giving Trump way too much credit: he is a childish sociopath who cannot plan ahead.
Instead, he has probably already asked the military to do something grossly inappropriate in the past few days, and received a firm “no” in response. That’s right: Trump has already attempted to literally stage a coup d’etat. It failed, of course, because such a thing runs counter to both the law and to over two centuries of military culture. Any reasonably intelligent person could have foreseen that, but Trump is too consumed by his elephantine ego to act reasonably or intelligently. So here we are.
The sackings of top officials in the Department of Defense won’t accomplish what Trump desires, either. He may end up with compliant appointees on top, but the generals below them will still balk.
The result won’t be as bad as a full-blown fascist coup d’etat, but it will be bad enough. The result will basically be chaos: some more pro-fascist generals will comply, but most generals will be traditionalists and resist. The pro-fascist media will then portray the resisting generals as rebelling against Trump and attempting a pro-Biden coup d’etat. Then when Biden takes office as a result of winning the election it will be portrayed as Biden being installed by a leftist coup.
The result will be a country more bitterly divided than ever, with the fascist side more certain than ever that tactics like military coups d’etat are legitimate.