I do think that some married men do pay for sex, perhaps for more variety or because something forbidden can be more exciting. My brother in law told my husband that he had sex with a prostitute once when he was in Europe. That was over 20 years ago. I suspect that this wasn't the only time he did this. He is a very conservative "family man" who helped raise his two step daughters and was the financial provider for his family. So, I guess I wouldn't make assumptions about who might want to pay for sex. Sure, some do it out of desperation and others do it for the excitement of doing something different or forbidden.
Some women cheat for the same reason, I guess, but it's probably more likely that married women cheat because they aren't getting the emotional and/or sexual satisfaction from their spouses. I never cheated on my ex, but I sure was tempted. It wasn't because we didn't have sex quite often, it was because he was emotionally dull, and loveless. I needed to feel loved and appreciated, which is something I never had with him. I have all of that and more now.
The problem of cheating is it requires desire and opportunity to align with risk and reward. There are plenty of married couples who have been faithful, in a physical sense, only because they never had a chance to cheat without fear of being discovered.
There are a small number of people, men and women, who cheat because they need constant reassurance of their attractiveness. Thankfully, that kind of person is rare and can be recognized by their history of intense but short lived romances.
The root cause of the great majority of cheating is resentment. When a person feels like the relationship is out of balance and their partner is contributing less than they are, resentment sets in.
One of the fundamental principles of a relationship, which many people never understand, a relationship is a set of mutual demands. We demand things from out partner and they demand things from us. Most of these demands are easily met, such as the one about not having sex with other people.
What this means in the real world is, in a relationship, you have the right to demand anything you want. This shocks some people, but why would anyone stay in a relationship filled with things you don't want? The critical point is to voice your demands, and only demand things you really want. Unvoiced demands result in dissatisfaction and quickly leads to resentment. Resentment erodes a relationship and instead of addressing the problem, a person seeks compensation outside the relationship. It's a temporary solution, but it's so efficient.
A person can spend 6 days in an unhappy relationship, coming home every evening to no joy, which sounds miserable, but the thought of a few hours away with their lover, makes it bearable. One of the signs that your partner maybe cheating is that they have become easier to get along with and more affectionate at home.