My wife has a rule for exercising. She can only watch television if she's riding her stationary bike. She can only do internet or social media (after) the dog has been on a good ruckus walk.
A great many of us do not go to the gym for social hour nor to be looked at. I go because I don’t want to spend $$ on weights and treadmills or stair masters. No maintenance on that stuff either, the gym does it. Not to mention the square footage to store that crap. Plus, it is the hour to hour and half a day I can ignore my phone (turned off in most cases) and totally lock out most of this crappy world and be left-alone. The health benefits are more than you can get riding a bike at home.
A side bonus is a do get to see pretty females from time to time.
I never understood gym membership either. It’s cheaper and more convenient to just buy a set of weights and a pull-up bar to use at home, or to go for a run/walk rather than using various devices to simulate walking.