Why do male coworkers only flirt with me right before they quit?

I've been at my job for six years and there's always some guys who been there either a year, two years, months or whatever. Whenever some of these guys are about to quit their first thing to do is try to flirt with me then get in my pants. The first guy that did this , i actually thought like me because we would have long conversations about stuff but sooner or later he would make sexual jokes but i wouldn't respond to them then later on ghosting me. Another guy, who didn't tell me he was quitting and i didn't know was quitting until i stopped seeing him, was trying to flirt with me then sleep with me at work but never tried it his 8 months there. It's all happening again with another guy but this guy worked there for a full year and rarely ever looked my way or talked to me.

Why do male coworkers only flirt with me right before they quit?
Post Opinion