Gastric bypass surgery is an operation that causes food to bypass part of the digestive tract. In the most common surgery, Roux-en-Y bypass, stomach size is reduced and a portion of the upper small intestine is bypassed. This means that food skips most of the stomach and the duodenum (upper small intestine), passing from the tiny stomach directly into the jejunum (a lower part of the upper small intestine)*. It looks something like this:
But as is often the case in biology, if you look more closely the situation becomes more complex. I noted years ago that people who undergo gastric bypass often see their diabetes vanish almost overnight, in a manner that cannot be fully attributed to reduced calorie intake or fat loss (1, 2, 3). That's probably because of changes in nutrient sensing by the small intestine that occur after bypass. When it comes in contact with nutrients, the small intestine sends messages to the brain via hormones and nerve signals that communicate the calorie content and macronutrient composition of the food (4), so the brain can respond appropriately. The brain then causes you to feel full, and coordinates activities in various tissues to make sure the nutrients get handled appropriately.
It turns out that the typical Roux-en-Y surgery does not reduce the proportion of calories absorbed from food much, if at all. Reduced stomach volume per se also does not explain the effect very well, as procedures that solely restrict stomach volume are not very effective in the long run (4A)**. If obese people who have had gastric bypass are losing weight simply because they can't eat/absorb enough food, then why aren't they hungry? Why does gastric bypass often improve thyroid status rather than decreasing it as calorie restriction does (5, 6)? This suggests that the body fat "setpoint" has been reduced, meaning that the body "wants" to be leaner rather than obese. Another strange thing about gastric bypass surgery is that it doesn't work on everyone. A case report of a person who lacks a functional melanocortin-4 receptor, a protein critically involved in body fat regulation in the brain, shows that he scarcely lost any weight after gastric bypass surgery (7). This suggests that the system in the brain that regulates body fatness has to be intact for gastric bypass to be effective.
One of the important things the small intestine does is communicate information to the brain that is used to determine the reward value of food (8). The small intestine, especially the duodenum and jejunum, is critical for assigning food reward (8). One might guess that bypassing the upper small intestine would have a major impact on this process. Well, apparently a few clever folks have already though of this, because it has been studied and published. Roux-en-Y bypass changes food reward in obese rats, making them relate to food more like lean rats, and several studies in humans are consistent with that idea as well (9, 10, 11, 12).
Although there are probably other contributing factors, the effectiveness of gastric bypass surgery is likely to be related to its ability to dampen food reward, and thus lower the "defended" level of fat mass, by interfering with the intestinal signals that the brain uses to assign reward to foods. The two most effective fat loss strategies I've encountered, gastric bypass surgery and drinking bland liquid food through a straw (13, 14), both seem to rely on reducing food reward.
* A less common version of the Roux-en-Y surgery bypasses the jejunum as well.
** Although stomach restriction could have an effect by increasing stomach distention with a smaller amount of food and/or changing ghrelin signaling. The former is a major satiation/satiety factor, and the latter is both a satiation/satiety factor and probably a body fat homeostasis hormone as well.