A curious thing happened in the second half of the Obama era: The commander-in-chief began viewing the military less as an entity designed to destroy enemies but a tool with which to achieve progressive goals. Warriors were turned into social-justice warriors. Men and women with risible-to-nonexistent military records were made heads of the services. Navy Secretary Ray Mabus (who had logged all of two years’ service as a junior officer) named ships after Cesar Chavez and Harvey Milk.

James Hasson, a former Army captain who served in Afghanistan, stresses in “Stand Down: How Social Justice Warriors Are Sabotaging the Military” that he isn’t making a partisan, political case against President Barack Obama’s efforts to reshape the military.

He asks important, nonpartisan questions, such as what is the military really for? And is it career military people or civilian bureaucrats who are better equipped to understand how to optimize its potential?

Hasson takes a sobering look at such matters as drastically lowering standards in order to pass more women through Army Ranger school, ignoring data showing that all-male Marine units outperformed mixed-sex ones and that female recruits are more likely to suffer serious injuries.

Hasson reports on a program in which male soldiers were ordered to train in fake breasts and distended bellies so they could experience what life was like for pregnant soldiers. Ordering a recruit to do more than 10 pushups as punishment for minor misdeeds was declared unduly harsh.

The Obama policy to overturn centuries of precedent and treat troops in accordance with whatever gender identity they declared, writes Hasson, is widely deemed within the military to be unlike the issue of homosexuality. For one thing, transgender individuals were already serving. Yet because the military ranks combat readiness ahead of soothing the psyches of its members, those individuals were required to meet standards according to their immutable biological sex.

If you are born male, you may call yourself female if you like, but you will still be held to the physical-fitness standards of other biological males. (The Obama policy decreed that troops could change their gender marker without undergoing sex-reassignment surgery or making any other physical changes.)

Among homosexuals, by contrast, the issue up for debate was not the individual readiness of the troops but whether the morale and cohesion of those around them would be adversely affected.

Moreover, once the concept of gender is ruled purely a psychological matter, it opens up other complications. What of the soldier who identifies as neither male nor female — the “nonbinary” individual? Four states now offer such an option on birth certificates, because it’s never too early to be uncertain about who you are.

The military is not the stage upon which such whimsy should play out.

President Trump has not even gone so far as to dial back transgender policies to what they were before 2014. The new policy simply requires service members to live and be treated according to their biological sex. It doesn’t bar transgendered individuals from serving. Yet there should be little doubt that virtually any Democrat would reverse that reversal upon being elected president.

The military is not the stage upon which such whimsy should play out.

This raises all sorts of practical issues. There were no endocrinologists available to maintain a regimen of hormone therapy when the troops landed on D-Day. Nor does it make sense to grant troops extended periods of leave while they’re transitioning, as was Obama’s policy.

There is a reason, Hasson points out, that no generals were present when Obama Defense Secretary Ash Carter held the press conference to announce the transgender policy. A 2016 poll found that only 12 percent of active troops thought Obama’s plan would improve readiness.

It used to be broadly accepted that the military is a special culture that is entitled to broad discretion about how it chooses its members. Military service is not a right extended to all Americans but rather a privilege extended only to the few deemed most able to accomplish the military’s mission.

Three-quarters of Americans are disqualified from service on various grounds — obesity, education level, physical fitness and so on. People with certain chronic conditions such as diabetes are barred, because of the difficulties such disorders might pose during deployment.

Winning battles is difficult enough without Washington visionaries ordering the military to operate like the Oberlin campus.