The military is not like civilian life. You have to depend on and trust those around you. Homosexuals disrupt that bond. The effect would be the same as putting one man in an all female barracks or a woman in an all male barracks.
And the military is not about fair. It's about following rules and order. It cannot run without them.