"Whatever doesn't kill you makes you stronger" is a lie. People who were lovely can be embittered and broken by life experiences, they can become completely discouraged, angry, etc. etc.
Having a baby, getting ill, losing a job, etc. can be extremely difficult, upsetting, scary and frustrating experiences. They break some people. Some men don't survive it emotionally and end up acting out, becoming horrible and violent.
You have to also remember that vast numbers of men are taught that the only acceptable emotions are blankness (no emotion) and anger... so if they feel sad, disappointed, worried, scared, etc, they can only experience it as anger, for example. That is really really difficult to overcome and can turn someone into a total arsehole in difficult situations.
Some people get brain injuries and become arseholes. It's not nice and it's not fair, but it happens.
There really are no guarantees. You can try to stay on the lookout for a man who takes care of his mental health, tries to communicate well, is a feminist, displays humility and egalitarianism, etc and that can be a bit of insurance - but people change, people are changed, it's just one of those things.
Good men don't go bad. Bad men were always bad, and the red flags were waving from the start but their partner chose to ignore them. This is victim blaming nonsense and displays a lack of education about how human morality is formed.