Exercising does several things, but first and foremost it produces a natural high that improves one's mental health.
Second it trains the muscles to be efficient: i.e. To work to the best of their capability to be strong and to metabolize the calories they get efficiently. Without regular exercise
muscles do not work efficiently, they get bogged down with excess carbohydrate calories.