There is natural variation in every population and in every generation. This provides a pool from which natural selection can select - this is how evolution works.
Among your ancestors, there were surely tribes that did not favor women this way. There may have been tribes that sent women to war alongside the men - shit like that. But the tribes that did favor women left more and healthier offspring (because fewer women were killed). And those tribes passed on their instinctive preference for white-knighting.
Now obvously, the leftist/feminist narrative of history is that women are and have always been horribly oppressed. "There has never been a society that favors women!" they protest. Of course, they also claim that the society you're living in right now still favors men, so these feminists are obviously full of shit. Generally, they are comparing the plight of average women to that of top-tier men; that's one source of their error. Another is that they're just blind to the preferential treatment you are describing.
I mean, you can even look at ostensibly very "misogynist" cultures and you'll still see the instinctive preference. Take a look at India, and remember the "how can she slap" video. If you just look at the surface you would think, "zomg women are oppressed in India!" but we have that video as compelling evidence for their preferential treatment.
Anyway, the answer to your question is that white knighting is instinctive and it exists because, in the past, it was heavily selected for.
Today though, birthrate statistics suggest that the environment may be selecting against this treatment. But that doesn't help you right now.