It is a subconscious, hardwired response designed to combat cuckolding.
Females have guaranteed assurance of their maternity. If the child came out of their womb, it is theirs. It is nearly impossible to skew this relationship and insert some fraud/doubt there. 99.999% of the time, this rule follows, and I mean that number literally.
Men have fewer guarantees. It is not difficult to fool a man into thinking a child that was not conceived by him actually was. This is the power women have by virtue of their biology, and it is the natural disadvantage that men have-their bodies are most central to reproduction, and women have complete control over them. It isn't difficult for her to shield a child's true paternity from a more committed mate if she just plays her cards right.
How is he going to know that she only lets him ejaculate in her when she is at the least fertile point in her cycle (a cycle she doesn't tell you about) while denying you at her more fertile points with the "I'm on my period" excuse, or that she was quietly swallowing birth control pills regularly and lying about it even as you thought you were both trying to have a baby together, or that she has another lover somewhere who she regularly allowed to hit it raw on her most fertile time of the month while denying that to you, or that she had a couple of flings a little while ago with the lead singer from that band you both like and he didn't wear protection? How can you tell?
As a guy, it is tough to be sure. Your average girl can subject your average guy (who, as we all know, is usually a beta and easily struck blind to female nature) to any of these scenarios and he wouldn't be the wiser until it was far too late. That's her power.
Men have a great fear of cuckolding. Do you know how women feel about forcible rape and sexual assault? There is much evidence to believe that this is how men generally feel about being cuckolded, unless they are outliers (fetishists). This is arguably the worst thing a woman can do to a man-not only cheating on him, but lying to him and convincing him to raise another man's seed as his own. Very bad things happen when the cuckoldee in question finds out about this type of fraud, and women who try this type of thing know this. It can drive an otherwise normal guy to serious violence. Rationality takes a back seat to emotion for a guy with revelations like that. At a minimum, it tends to put an end to the family in question.
From a biological perspective, this fear makes sense. Every male seeks to procreate and ensure that his own seed continues into several more generations, and most men have to work pretty hard in order to make sure that happens (historically,
only 40% of males who have lived have reproduced before the modern era-not every dog got his day). Legacy, for this reason, is often important to men, and cuckolding is a direct threat to the continuation of any man's legacy.
So, how do men guard against cuckolding?
Two options:
1. DNA testing. This is a pretty great tool for men to guarantee that their children are theirs, as it is very nearly 100% accurate.
The problem, however, is that DNA testing is new. We've only really had it for 2-3 decades now. For most of human history, there was only one other option...
2. Slut shaming. Socialize women to be more sexually conservative, suppress their innate sexuality (which is naturally hypergamous), discourage them from sleeping around and label/shame (or severely punish) the ones who still do.
The logic behind this type of thing makes enough sense. Wanna guarantee that your kids are yours as a man? Forcibly remove your woman from the company of other men and/or shame her for entertaining said company on a regular basis. Keep her under your complete control socially and politically and you can monopolize her reproductive capacity and prevent any other guy from getting there, thus eliminating the threat of the cuckold nightmare. You can dress it up with philosophical and/or religious overtones (the religious justifications are most popular), but at the end of the day it is simply the male's way of combating the threat of cuckolding.
Bottomline: Cuckolding is the root cause of male slut shaming and/or aversion to sluts as long term partners. This fear is deeply embedded in the minds of most men and is not going to go away. Women know this, which is also why they tend to underestimate their number of partners when directly questioned about it. It is possibly also why they slut-shame one another more harshly than men ever do. If they make their peers look like whores and keep their own images intact (regardless of whether or not they too are "sluts"), they know they have a better chance at landing a higher quality man, who they know won't be as likely to invest in an openly slutty woman. It is just another weapon in their endless (and, to many men, remarkably fierce) competition with one another.
Men know subconsciously that a good girl's companionship offers a higher likelihood of his own genetic continuance (lower risk of cuckolding). Women, aware of this, all thus try to look like good girls (even if they too are guilty of slutty behavior) and/or rationalize their slutty behavior away ("I've had my fun!").
Everyone is just trying to find their way through a natural biological framework.