Formula 1 cars are finely tuned and constrained by a myriad of rules, one of which is minimum weight. The cars can be called to the weigh station at any time over the weekend and they risk penalties if found to be under the minimum weight.
When the cars start the race they have around 100kgs of fuel and as the race progresses the weight reduces the performance of the car can go up, so there is an incentive to manage the fuel load to a minimum.
In addition to this, as the tyres degrade they shed rubber (marbles) and therefore weight. Driving through the marbles, after crossing the finish line and before returning to the pit lane, with hot tyres so the marbles stick to the tyres is a way to add weight back to the car to help ensure the weight is within the required range.