A lot of offices in London closed their gyms over the pandemic and never brought them back. I always thought that was pretty stupid. A lot of people who could WFH even before then used to come in for the free gym at least.
When I worked at a company with a gym, people would finesse their workout into their working day, so they weren't spending additional time in their day working out. That's the perk imo, the time savings and convenience, not saving on a gym membership.
Part of the perk is also avoiding the question "is it worth it for me?". There's way less friction when something is free, even when compared with a somewhat negligible price.