I've always had the ability to work out from home, and during the pandemic I've pretty much had to, but I greatly prefer going to the gym. I'm really not social at all, but I just feel like I can get much more "in the zone" at a gym than my house.
Plus many acquaintances of mine reported that they had to resort to making a small room in their apartment a dedicated home office which they had to lock in order to prevent distractions from their kids.
For some people like the two us, having a dedicated recreational space is motivating you to do the recreational activity. Trying to do it at home invokes thoughts like "What's the point? I'll inhale so much dust and smog, what's the healthy aspect of that?".
So for us it boiled down to a psychological lock which seems mostly bound to proper air and temperature conditioning at the gym.