The label is so you know how much sugar has been added, and juice just has issues with the label in the US.
It is put on the label so you can see how much sugar the companies are adding, compared to how much it contains normally. Most people would not have any idea how much sugar, say bread or juice, contains naturally, so it is important to know how many empty calories companies are adding.
Your mindset is the very issue. A loaf of bread or bottle of juice may have more than a candybar's worth of sugar added just to make it easier to sell. So you are eating lots of candy without knowing it. A bottle of juice may have just as much sugar as soda or other drinks we think of as "sugary". This is an issue in the US, because the US has little regulation on adding sugar (due to a powerful lobby), so many things are loaded with extra sugar. Your body does not care whether the added sugar is in a candy or or bread, or juice. This is one reason the US consumes 5 times the recommended amount of sugar.
From the FDA and CDC
The Dietary Guidelines for Americans recommends limiting calories from
added sugars to less than 10 percent of total calories per day. For
example, if you consume a 2,000 calorie daily diet, that would be 200
calories or 50 grams of added sugars per day. Consuming too much added
sugars can make it difficult to meet nutrient needs while staying
within calorie limits. Added sugars are listed on the Nutrition Facts
label so that you can make informed choices, based on your individual
needs and preferences.
If both juices had the same amount of sugar one was likely lying, again US crap regulation. They can put "no added sugar" on the label while still adding lots of sugar in forms like extra concentrate or honey, or agave nectar. Other countries are a lot more strict about what counts as added sugar. Added sugar is not bound in fiber or other things that slow the absorption.
To be accurate, the causes of diabetes are still being deeply studied because the complete mechanisms are not known. But one thing we have good evidence for is rapid absorption of sugar likely contributes to diabetes. Added sugar is essentially always rapidly absorbed and thus is a contributor to insulin resistance. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3836142/#:~:text=Diets%20with%20high%20glycemic%20index,risk%20of%20type%202%20diabetes.
There are other factors as well. Excess sugar is basically always turned directly into fat and for actual diabetics, added sugar is an even bigger deal, so knowing how much added sugar is present is important for making knowledgeable choices.
A final consideration: Much of the sugar in candy is made from vegetables (beats, corn, or cane), so just because it comes from something healthy does not make it healthy.