Evolution is a harsh master (or if you prefer, "mistress").
Men are programmed to look for fertile/healthy as the PRIMARY requirement for sex partners so that their genes have the best chance to get to the next generation. This also pushes them into wanting sex with as many different partners as possible since the more variety they have in pairings, the more likely a pairing will ... get to the next generation.
Women are programmed to try to get support for them getting their genes to the next generation. This means they look for resources, a track record of understanding and navigating the world, etc. A man with "just a dash of gray" has been around the block a few times, but is still healthy. They are still young enough to be helpful raising children, but not so young that they'll be clueless.
Of course, they also want their children to get THEIR genes to the next generation, so they want them to inherit the attributes of people who are successfully promiscuous (aka "bad boys").
This leads to sex with bad boys and marriage with reliable partners. Yes, it leads to cuckholdry.
These are built into our instincts.
Fortunately, humans can surpass their instincts. We're all afraid of falling but some of us jump out of airplanes.