During bariatric surgery, the stomach size is reduced or the digestive system is rerouted to limit food intake or nutrient absorption. This leads to weight loss by restricting the amount of food consumed or absorbed by the body.