Well, from title 10 of the US code, here’s the section dealing with the prohibition of homosexuals in the armed forces:
http://www4.law.cornell.edu/uscode/10/654.html
(a) Findings. -
Congress makes the following findings:
(1) Section 8 of article I of the Constitution of the United States commits exclusively to the Congress the powers to raise and support armies, provide and maintain a Navy, and make rules for the government and regulation of the land and naval forces.
(2) There is no constitutional right to serve in the armed forces.
(3) Pursuant to the powers conferred by section 8 of article I of the Constitution of the United States, it lies within the discretion of the Congress to establish qualifications for and conditions of service in the armed forces.
(4) The primary purpose of the armed forces is to prepare for and to prevail in combat should the need arise.
(5) The conduct of military operations requires members of the armed forces to make extraordinary sacrifices, including the ultimate sacrifice, in order to provide for the common defense.
(6) Success in combat requires military units that are characterized by high morale, good order and discipline, and unit cohesion.
(7) One of the most critical elements in combat capability is unit cohesion, that is, the bonds of trust among individual service members that make the combat effectiveness of a military unit greater than the sum of the combat effectiveness of the individual unit members.
(8) Military life is fundamentally different from civilian life in that -
(A) the extraordinary responsibilities of the armed forces, the unique conditions of military service, and the critical role of unit cohesion, require that the military community, while subject to civilian control, exist as a specialized society; and
(B)the military society is characterized by its own laws, rules, customs, and traditions, including numerous restrictions on personal behavior, that would not be acceptable in civilian society.
(9)The standards of conduct for members of the armed forces regulate a member’s life for 24 hours each day beginning at the moment the member enters military status and not ending until that person is discharged or otherwise separated from the armed forces.
(10)Those standards of conduct, including the Uniform Code of Military Justice, apply to a member of the armed forces at all times that the member has a military status, whether the member is on base or off base, and whether the member is on duty or off duty.
(11)The pervasive application of the standards of conduct is necessary because members of the armed forces must be ready at all times for worldwide deployment to a combat environment.
(12) The worldwide deployment of United States military forces, the international responsibilities of the United States, and the potential for involvement of the armed forces in actual combat routinely make it necessary for members of the armed forces involuntarily to accept living conditions and working conditions that are often spartan, primitive, and characterized by forced intimacy with little or no privacy.
(13) The prohibition against homosexual conduct is a longstanding element of military law that continues to be necessary in the unique circumstances of military service.
(14) The armed forces must maintain personnel policies that exclude persons whose presence in the armed forces would create an unacceptable risk to the armed forces’ high standards of morale, good order and discipline, and unit cohesion that are the essence of military capability.
(15) The presence in the armed forces of persons who demonstrate a propensity or intent to engage in homosexual acts would create an unacceptable risk to the high standards of morale, good order and discipline, and unit cohesion that are the essence of military capability.
[/quote]