Having a lover who's married can be a complicated situation for several reasons. It's never easy to meet up with them, especially spontaneously, and the time that you actually get to spend with them is always going to be limited. Just getting into contact with them can present difficulties; you just never know if they're alone, with their official partners or busy with their families. An ongoing affair requires care and discretion at all times.
Flirting in the office is usually just an innocent game that helps to pass the time and brightens up the day. It also acts as a wonderful distraction from the tedious tasks of daily employment. Sometimes, you don't even need to be partiularly attracted to the person you are flirting with either. When you spend all of your working day confined in the same space, hour after hour, with the very same people, your tastes may change without you even being aware of it.