There's a reason why scientists have to meet strict ethical criteria today, and it's partly, you know, ethics, but it's also because of many unjustifiable and occasionally straying into evil experiments that took place in the past.
One such experiment in the 1940s and 50s provided us with evidence for the connection between sugar and tooth decay, but in a way that would probably land you a significant amount of jail time today, or at least lead to you having to hand in your science license and gun like a disgraced police officer.
First, imagine that you strongly suspect that sugar causes cavities and sugar decay, but no firm evidence. Congratulations, you have placed yourself in the mindset of a large number of dentists in the early 1940s. So, how do you go about proving that sugar causes decay, bearing in mind that you believe that indirect evidence is "overwhelming" that sugar causes cavities?
a) wait until a natural learning opportunity presents itself (e.g. compare communities where sugar intake is high to those with low sugar intake, or notice that tooth decay decreased during rationing) and build up more evidence this way or:
b) get out there and impatiently begin shoveling sugar into the mouths of children in a hospital and just sort of watch what happens, suspecting full well that that will be "their teeth will rot away", without gaining any form of consent
If you selected option b, then you are somewhat in tune with a group of dentists in 1945 Sweden, who – with the approval of the medical board of the time – began to feed copious amounts of sugar to the patients at the Vipeholm hospital for intellectually disabled people.
The experiment began with an inspection of the patients' teeth, which were better than the Swedish population as a whole, likely due to less sugar in their diets. In the first phase of the experiment, the children were given half the amount of sugar that was typical in a Swedish diet, as well as vitamin supplements and fluoride. After two years, the majority of the children had no new cavities upon inspection. So far, so ethical.
The next phase was much worse. The children – who were already being mistreated, being confined for too long, and given cold baths when they misbehaved – were given twice the amount of sugar of the Swedish population. This was given in three forms, to different groups:
One group ate the sugar in bread, served at mealtimes. Another drank their sugar at mealtimes, in drinks sweetened with one and a half cups of sugar. The final group ate their sugar between meals, in the form of chocolates, caramels, and toffees that had been specifically manufactured to cling to the children's teeth.
As you'd expect, the study showed that sugar did in fact cause decay. A lot of it. Among the patients involved in the study, there were 2,125 cases of tooth decay by the end of it, a lot of it quite extensive. Almost half had teeth that were completely rotten.
Despite obvious ethical concerns – and the fact that the researchers did not check for other medical conditions in the patients such as diabetes, which would be worsened by high-sugar diets, and also the fact that patients were not provided with dental care during or after the study – the study had provided hard evidence of sugar causing tooth decay. The researchers then sat on this evidence for several years before publishing, which might be due to the fact that their funders – the sugar industry – were not best pleased by the results.