It's simple.
Some people value an exciting encounter over their current relationship, people can have an addiction to the rush or have felt numb for too long.
Over simplifying - there's nothing wrong with their current phone but some people will rush and buy the latest to get the buzz of a new gadget.
They weigh the chance of getting caught and damage it will cause as lower than the excitement and fulfilment of a new fling.
We've all been there, seeing someone attractive from the opposite sex and having thoughts of an encounter. Whether you chose to act on it or not depends on your integrity and empathy. Some people have more than others.