Going to a gym doesn't mean doing only one type of exercise, you can do yoga or cardio in the gym as a form of recovery if you mainly train for resistance for example