Everything is risky, riding a horse is risky, going sailing is risky, doing a stressful job is risky. Running marathons often causes health problems. Being sedentary causes health problems.
Being lonely is terrible for your health. Having a beer with your friends could be as important as another evening in the gym.