Legally speaking, it is definitely illegal to take other people's property for yourself without their consent. But there are too many cases, so if you really do this, it is estimated that no one will care, provided that the people in the gym can't contact you on the way, or just don't give you a refund. Something needs to be moved.
The value you deserve is equivalent. For example, the gym should refund you 1000 yuan, and you moved something worth 1000 yuan, which is unacceptable.