The military has often served as an unintentional force of acceptance and tolerance in American society. Because the armed forces are essential egalitarian (in the ranks) and because people people tend to server together closely in stressful circumstances, barriers often break down.
For example, many service members ended up working for Civil Rights during the 50s and 60s because of their experiences serving integrated combat units. The military had taken steps toward integration long before much of the rest of the nation did. So Black and White soldiers got used to living and working together. Returning to a world where that was forbidden inflamed their consciences.
Much the same thing has happened with LGBTQ and HIV poz service members. Living and working together, their colleagues come to understand personally that they don’t have anything to be afraid of.