Recently Trump has issued a ban on transgenders serving in the military, with some leeway granted to the Pentagon. When a new regulation is created normally it is intended to fix some problem. So what is the problem this is fixing?
There are somewhere about 2,000 to 10,000 transgender troops now serving, out of a total active duty population of about 1.5 million. There have been no reports of problems caused by these several thousand troops, and several studies (including the Rand study in 2016, which has been criticized by Mattis) have found no problems.
On the downside it creates significant problems for those who are transgender but still are patriotic enough to want to serve in the military. More importantly it creates a significant management headache for those who must enforce it. On the upside – ????
So why is Trump doing it? The most charitable answer is that he is creating a distraction along with sending a signal to his base that he will fight for the right-wing Christian sense of morality. Pretty much a repeat of the fictional transgender bathroom issue. A darker answer is that Trump enjoys causing distress for others.