The rationale is simply this: that the women were considered, and are still considered, the weaker sex; that in itself is a sexist classification, but it is the basis for the code that a woman, any woman, is completely invulnerable at the hands of a gentleman. Their role as mothers and the makers of homes gives them that distinction, without, in modern-day thinking, depriving them of any of the rights of participating in an equal career. It is as irrational as any other social custom; we each have to choose what we follow. It is for me to decide if I wish to conform to the ideal of a gentleman, or carve out my own rules.
A woman assaulting me first, or even a woman stronger than I assaulting me first, assault here being the legal act known as battery, would still be a woman, except - these are the exceptions - espionage and armed combat, where nations are involved. In the national cause, a woman taking up arms and fighting as an equal is no longer vulnerable, as her opponent (if soldiers fighting for their nation) would be compelled by his duty and his oath of service to eliminate armed enemies. An unarmed woman would enjoy the same privileged position as in civil life. In the case of espionage, also, a woman might be executed by order of a court; that would count alongside the punishment of women under the law. Such a punishment is not an individual act, it is an act of the state implementing the laws it has given itself.
More, if you wish, this evening. I must rush to a seven'o'clock appointment.