Once the link between smoking and and cancer was proven, the government (eventually) stepped in to making smoking as expensive as possible, to discourage people, and implemented the smoking ban so that people didn’t have to work or socialise in smoky environments, thus reducing their exposure to second hand smoke.
Obesity increases your risk of getting cancer, and decreases your ability to survive it. Obese parents are more likely to have obese children. I see no reason why the government shouldn’t step in to change behaviour, in the same way it did for smoking, to help people live longer.
It is no longer socially acceptable to smoke around adults, let alone children, so why is it acceptable to put up with bad diets, which will lead to obesity? And why should children not expect the adults in their lives to provide them with healthy diets?