There are several layers.
First, those running NASA understood that talent was not dependent on race, religious beliefs, sexual preference or sex itself.
Americans though, even those working with such people were extreme bigots.
And finally, those running NASA understood that they could not change the latter while they absolutely needed the former.
As has so often been the story, pragmatism won.