I cycle, and when I see another cyclist up the road, I do all I can to catch them. If one overtakes me, I ask if I can try and keep their wheel.
I’m sure some think something negative about it, but for me, it keeps my exercise interesting and makes me faster and stronger. I probably wouldn’t cycle half as much if I didn’t do it.
I can’t say if the people overtaking me had that same thought when they saw me up the road, but I bet some do.
I can see in a gym environment what you are doing is a bit more in their face, but do whatever you need to motivate yourself.
In a gym it’s likely you’ll end up making friends with someone where you can push each other to new heights!