I don't think people cheat because they are horny, primarily. They're unhappy in their current relationship and cheating is a tool to sabotage or end the relationship. In that sense, the risk is the entire point.
Is this also self sabotaging a relationship? Sure, but if they wanted out of a relationship then they could do that via divorce. Actively searching for a new sexual partner seems to me to be what it appears to be on the tin... looking for someone new to sleep with.
People often don't know if they really want to end a relationship or not and even if they did, breaking up is hard to do. They don't just get divorced one day, there's usually years of lead up. And as people start to grow apart or to resent each other, they can act out in all kinds of ways, including cheating. And if someone is too afraid to pull the trigger and actually end a relationship, getting caught cheating is a great shortcut.