Steve Shirley https://en.wikipedia.org/wiki/Steve_Shirley was able to found a computing consultancy business in the 1960s staffed entirely by women that had been fired when they got married, as was the usual practise at the time.
Source: have seen the ads specifying such.
What makes you think it was common practice? Exceptions are a thing…