Transgenderism has been a disqualifying condition for a while. It was only last year that they reversed on that. The ban was originally based on the view of transgenderism being seen as a mental illness, and lumped in with a bunch of other potentially medically disqualifying conditions, such as flat feet, diabetes, heart issues, dental deficiencies, being too tall, too short, too fat, etc.
I'm all for every able-bodied person being able to serve, but the minute a TG person decides they want to pull the trigger on gender reassignment, they're likely looking at several years of therapy, hormone treatments, the surgery itself, and so on... which means that person is non-deployable. When you're non-deployable, you're essentially useless for duty as far as the military is concerned and is a measurable statistic for unit readiness.
Any commander would probably tell you that the last thing you want is for a service member to come down on the nondeployable list when they run their reports. Hell, one time I got called to my commander's office because I'd just gone over a 6 month threshold for dental appointments, which got me on the nondeployable list. Now, it's one thing to be able to make up a dental appointment within a week of getting on that list... it's another to be sidelined for a sustained period of time due to an elective surgery.
I could give a shit about troops being "uncomfortable" with TGs in the service. If you're downrange in a fighting position bearing down against enemy forces, whether the person next to me is trans, gay, lesbian, bi or whatever is irrelevant so long as they're on my side and fit for duty. OTOH, if, in that same scenario, the person next to me starts having issues because they're coming to terms with their gender identity and wants to run off to talk to their therapist, well, I'm going to have resverations about their effectiveness.
Mission readiness is priority to the military, not the 'social experiment' bullshit. Gays have been in the service since forever, regardless of DADT and other regs against their service which have been lifted. Hell, in my unit, everyone knew who was gay and who wasn't and it never caused a stir. (Of course, I wasn't infantry or combat arms... MI tends to get a different 'demographic' and was a bit more 'lax' for lack of better term). And the lesbians always had the best barracks parties.