If you regularly lift truly heavy weight, you need a squat rack and a rubber floor capable of sustaining equipment drops.
Going from a dedicated machine to another dedicated machine is faster than reconfiguring a universal machine like a Bowflex. Pace matters in a workout. Rests are regulated.
I own variable weight equipment. Someone sold me a set of Turbobells, which scale from 5 to 60 pounds per hand. It is a great system similar to Bowflex Selectech. My workouts require using 3 progressively heavier weights. It is a common body building technique.
So, for my arms I need 10, 12.5, and 15 pounds. Some exercises are 15, 17.5, and 20 pounds. My legs are stronger, so I use 35, 40, and 45 pounds. If I didn't have an adjustable set, this would be a lot of free weights and good luck finding fractional sizes in a store.
Gyms usually have good air flow, at least at the gyms where I am a member. Many have amenities like swimming pool, whirlpool, massage chairs and so on.
Dropping weights at a gym is annoyance. Doing so in an apartment above neighbors is evictable.
People whose goal is to lose weight do not need a gym.
Completing my workout with a set of dedicated weights at 2am when I have the gym to myself is at least 20 minutes faster than with my adjustable weights. So, using a gym also saves time.
Costs to replicate a gym: 1. 8x4 1" gym mat - about $150, weighs over 100lb - just looked into this last week. 6x3' horse stall mats are decent also. 2. Free weights - a few hundred all-in 3. 8' Mirror - not cheap and yes they are necessary 4. Adjustable bench - over $100 5. Gym-like variable height adjustable treadmills are not cheap
All of this takes space to store. If you do not have excess space, that adds to setup and teardown time.