A gym membership may be more cost-effective in the short term, but over time, investing in a home gym can lead to savings and cost benefits.