Trump and transgender citizens in the armed forces

Nineteen (19) countries allow transgender citizens to serve in their armed forces including Canada, Israel and most of Western Europe. This would seem like a reasonable thing to do. If a woman can do a job, how is a woman who identifies as a man any less able to do the job?  The same for a man who identifies as a woman.   There are documented cases of transgender people having successful military careers hiding their sexual identity.

One of the alleged reasons for the ban is that Transgender people join to have the expensive operation paid for. Not all Transgenders want the operation. It makes little sense to expel those that already have had it.  Many join the military for the benefits like retirement and educational. Why is this benefit so different? Trump could also try to ban the operation only.

This is just one more poorly thought out action by a President who cannot reason well.