help please.

So question.  if you caught your bf or gf searching for sexual encounters on Craigslist. What can that mean? Are they unhappy? Or what can the person do to help that? Or are they even wrong for trying to make that person happy when indeed that person intention was to cheat ?
I've been dealing with it. My bf cheated. He got a blow job from an encounter. We've tried moving on. Well we are and more than happy but the thoughts come back. And I'm hurt because of it. My main question is why would he do that. Or why do men do that. What's the motive! 
Recovering from it is hard. I've gone into drugs to avoid even thinking about it. But idk what I could do to even try and forget about it let alone trust him. Need advice. Crucial.