Joker works out he takes on Batman in several instances just because we don't see him at the pile or sling some iron doesn't mean he wasn't! Probably working on his tire flips behind the bank when we get to him in the movie.
Outside of temperature control as others have mentioned, there's also a greater sense of security while exercising, showers available, and seeing others train can motivate you if you're the competitive or visual sort. Plus treadmills are less impactful to your knees compared to trail runs so they are good for recovery/casual runners.
In all honesty, gym memberships are terrible value for money by itself. Its value comes from convenience and saving time for a person who wants to train with some consistency.
This is some stuck up shit right here. People are getting out and exercising and we're judging them for not doing it how we like. Gyms are much more than treadmills, treadmills are easier and more consistent for people starting out, the summer heat is brutal and gyms are air conditioned, or maybe you just wanna watch something to take your mind off the run itself. There's lots of great reasons to use a treadmill at the gym.