The solution evolution found was to make us really like having sex. But then we invented hormonal birth control, and sex became uncoupled from reproduction. Evolution can't help us here, it works slowly over thousands of years, and can't uninvent birth control.