A large part of the answer lies in a hormone called insulin. Insulin is essential to life in proper amounts and can be detrimental when produced in excess.
All carbohydrates, whether they are in the form of whole grain rice dishes (complex carbohydrates) or a chocolate bar (simple carbohydrates,) turn into glucose (blood sugar) once they enter the bloodstream. Simple carbohydrates cause a very quick rise in blood sugar and trigger the pancreas to rapidly release insulin.
Insulin controls where blood sugar becomes stored. Its main task is to convert glucose to glycogen (the stored form of sugar,) which is typically stored in the liver. At a later time, the glycogen can be converted back to glucose and used as energy.
When carbohydrates are consumed in excess, especially simple and refined carbohydrates, some are used immediately for energy, and some are stored as glycogen. Generally it is considered that only 2,000 calories can be stored as glycogen in the body at a time, and so the excess is stored as fat.
As long as the body continues to get a steady supply of carbohydrates for energy, it will not need to tap into the fat-storage to utilize fat as an alternative form of fuel. This is why eating a diet that consists of mostly simple carbohydrates makes weight loss very difficult.
When people lose weight on high-carbohydrate, low-fat or calorie restricted diets, the pounds often come from muscle and water, rather than stored fat. Complex carbohydrates, such as whole grains, don’t cause such a drastic increase in blood sugar levels. Instead they provide a steady source of energy.