I have been out for a while, and am trying to catch up.
Years ago (during the Obama administration) I got numerous inquiries from friends regarding the possibility that Obama was purging senior military leadership of people he didn't like. These inquiries were a result of heavy posting on ultra-conservative and conspiratory sites that this was going on.
I knew of some of the situations regarding very senior leaders. In every case, the firing of these generals/admirals was justified. In virtually all cases due to abusing the power of their office. I would say about 2/3 of the cases involved sexual misconduct (Generals in their 50s going after very junior subordinates in their 20s and early 30s). The other third were engaged in financial shenanigans and got caught (usually something along the lines of having the military/government pay for a part of their "life style").
The military has done an exceptional job since World War One (over a hundred years ago) in insulating its promotion process from government and presidential interference. There are exceptions, but they are VERY rare, and only a couple occurred even in World War Two.
The military itself decides who becomes a senior officer or general. Congress has the option to reject someone, but this is also VERY rare. The president's options seem to be limited to which 4 star general/admiral is appointed to a senior command or to Chief of Staff.
This is a very good thing, from the perspective that it keeps politicians out of the mix when deciding who gets senior promotions in the military. The downside is that, in the absence of a big war where incompetent leaders are found out (think the Civil War or early WW2), the military itself devolves into a "club" with its own horrendous office politics that prevent the "best and brightest" from getting to the top.
Obama did not "purge" senior military leadership. Biden is not doing so now. Military leadership, for the most part, know to NOT become involved in politics. Doing so while on Active Duty can quickly lead to the end of your career. Even bad mouthing governmental/presidential policy is incredibly dangerous, as you have no right to do this while serving. Most understand this and follow the rules. A serving general/admiral who goes on camera and says "this decision by the president is stupid" is going to get fired the next day and will be retired shortly.
Also, those who do things that are immoral/illegal are (hopefully) going to get exposed and punished. There is literally a division of the Inspector General office that does nothing but investigate accusations against general officers. I am sure the Navy has the same set up. It used to be that the "good old boys" network would protect them against sexual allegations, but no longer. And most are smart enough to wait until after their retirement to get the money from contractors (in the form of high paid cushy jobs with them).
As for the politicization of law enforcement, I would say that this has been the norm in big cities for years. Not so much in the suburbs or rural areas, where we still elect sheriffs and attorneys general.
There are serious problems in law enforcement, and this has been true for a VERY long time. We do need to change the "culture" of law enforcement in the United States. Defunding the police in urban areas is NOT an option. But we need to change how we conduct law enforcement.
A very close friend of mine is a British Army officer. He served in the Special Operations command in Florida on an exchange assignment. Before going there, he was repeatedly warned by his embassies senior officers that American police were NOT British police, and that he should never interact with them in that way. We could learn a lot of British policing techniques and procedures.
The article that spottybrowncow referenced seemed to me to be overblown reactions based on limited understanding of what is actually going on. I am sure that the Left wants to get rid of all conservatives in positions of authority. Just like conservatives would like to get rid of all liberals. But there is no ongoing program or conspiracy to do this outside of elected politicians wielding the power given to them by their office. Liberal mayors are going to use liberal ideology to find and appoint people to be their police chiefs. Luckily, the president and his administration cannot go into the military and pick who will become a general (or even a theater commander) based on political orientation.