Yes, it's because that's how titles work. Knights are always "sir" regardless of gender. Even the Armies we have today use "sir" towards higher ranks, regardless of gender. Ma'am/Madam isn't used in the army, at least in the US, I can't say for others, but I doubt it's much different.