Do married or taken people ever hit on/flirt with you?

Not like checking you out or hitting on you while theu are with their partner of course, but for instance if you go to the supermarket, someone could legit hit on you, even though you can clearly see the wedding ring on their finger, or you go to the bar and someone comes up to you, or people that are clearly taken based on their public posts flirt with you through dms and such. Do you think they just want attention, or that they are unhappy in their current relationship and testing the waters with you, just teasing or messing with you, etc?