Taking photos with your ID card is for possible disputes in the future, leaving evidence that can be solved through formal channels.
When you take a photo of your ID card, you can stick a small note on it without blocking the effective information, indicating that the photo of your ID card is only used for the card stopping business in the gym to prevent the ID card information from being fraudulently used by others.