The key to diet and exercise is the energy equation. Energy intake = Energy output.
If more energy is expended than consumed, weight loss occurs, and vice versa. The body’s immediate energy reserves are stored as carbohydrates and water. At the beginning of any regimen, the typical negative energy balance causes these reserves to be used up. The dramatic weight loss happens from water excretion when carbohydrate energy sources are depleted.
The body only starts utilizing its fat storage only when sustained energy deficits from strict diet and exercise is maintained. Unfortunately this is also accompanied by sensation of hunger, and if at any point energy intake exceeds expenditure, that gets stored in the body as carbohydrates again with corresponding demoralizing water weight gain.