Until 1975 this was lawful. Married women in particular were routinely turned down for credit in their own name, and an unmarried woman who married sometimes lost her entire credit history in favor of her husband’s. A single woman under 25 would be routinely asked to have her father co-sign a credit request, regardless of her credit score.
The fight for independence for women had a major victory in 1975 due to feminist lawmakers of both genders who put an end to this unfair credit practice.