I have been a member of various gyms for many years, including the famous Gold's Gym in Venice, California. I have yet to go to a gym that has good classes. Oh, the classes are usually fine, but they are just OK instead of fantastic. Yoga in particular is not so great at the gym. At my gym they charge extra for it and it's not even a good class. This may be in part due to the low pay some gyms offer their instructors.
One of the yoga teachers at my gym last year was complaining that she was terribly underpaid and not treated well. She was also having trouble getting the gym to agree to an outside substitute. Well, unfortunately, her response to this was just to be a bit flaky. Her frustration came through in the classes. So any discount I might get from taking gym yoga was offset by the poor offerings there. Who wants to get yoga from an instructor who is just going through the motions?
Since then, they have gotten new instructors who may be better, but I balk at paying extra for classes that should be part of my membership. I'd rather support a local yoga studio.
Now, I'm not saying all gym classes are bad, and some teachers might be fantastic and enthusiastic even when underpaid. But I don't get a gym membership for the classes. I go for the machines and the pool.
I use to work at a gym and I don't know how much the instructors got paid, but I know they taught many classes throughout the day at various gyms. It seemed like the members who were interested in the classes mainly used the gym for only that and vise versa. I took one of my first classes this morning (Pilates on the ball) and really enjoyed it. The teacher did not do a lot of the exercises with us today, but she explained she was sore and tired from another class she took. Overall, I enjoyed it.