Why do men at the gym hit on me?

I had an older guy ask me if I’m single and taking resumes, others stare a lot but don’t talk to me, and some compliment in passing. I’m new to the gym so not sure how common this is and if I should be suspicious/have my guard up.
Why do men at the gym hit on me?
Post Opinion