Legally speaking, it is definitely illegal to take other people's property for yourself without their consent. But there are too many situations like yours, so if you really do this, it is estimated that no one will take care of you, provided that the people in the gym can't contact you, or they won't give you a refund at all. Also, what you move should be equivalent to the value you deserve. For example, the gym should refund you 1000 yuan, and you moved something worth 1000 yuan, which is unacceptable.
There is another saying that the law does not blame the public. You can ask other friends who apply for cards in the gym to move together.