I think a lot of it was due to them still trying to figure things out. It was still difficult for them to look past the beliefs of hteir time period, although you'd think even with TOS' talk about abandoning bigotry and supporting equality, they'd apply that to sexism too