The physiological effects of starch, which is composed only of glucose, are very different from the effects of sugar, half of which is fructose.
Until about two hundred years ago, all the sources of concentrated sugar, i.e. honey, cane sugar, dried fruits and boiled fruit juice were very expensive in comparison with other kinds of food and very few people could afford to eat them more frequently than a few times per year, at more important holidays.
Almost nobody could eat food with high content of sugar every day, like most people do now.
The availability of sugar or glucose-fructose mixtures that are cheaper than almost any other kind of food, so they are now added to reduce the cost of industrially-processed food, is a very recent phenomenon.
Another thing is that historically, malnutrition was a thing, not just something rare. The people would be getting serious diseases or be dying because of this or that missing in the food, there were whole epidemics of diseases that basically do not exist anymore.
The context here is that major food group that was pretty significant source of calories - complex carbohydrates was skipped creating dichotomy between sugar and fat.
The recommendations that I have seen are that up to around 50 g of sugar per day (25 g of fructose) should be fine.
Most fresh fruits have about 10% of sugar, so you need to eat more than a pound or a half of kg to reach levels of sugar intake that could be unhealthy.
Only a few fruits have more sugar, above 15%, e.g. grapes, fresh figs or fresh dates. Even with those you must eat an amount over what would satiate most people, in order to get too much sugar.
On the other hand, if you eat one chocolate (many of which contain 60% or more sugar) or a few candies you are likely to have already exceeded an acceptable daily intake.
And still, that doew not mean you nmed to cut complex carbohydrates and go keto ... especially if argument is how people 300 years ago eate. It was not keto.
And it is not used that way by people who push keto and low carbohydrates diets on HN.
And again, it renders fat vs sugar dichotomy meaningless.