A high is followed by a low
You have the right idea. Increasing your energy levels before a workout can benefit you. But refined sugar, as found in chocolate and biscuits, has a very short lasting positive effect, after which you "crash". It's quite like an opiate in the sense that it gives you a dopamine high, followed by a period of feeling taxed, tired, and irritable.
In fact, Dr. Wayne Osborne wrote a nice article outlining the timing of a sugar high followed by the inevitable crash here.
Why we choose healthier options
The reason why sugar gives you a high is because glucose is digested quickly (because it is a simple carbohydrate) and gives you a dopamine kick, and also suppresses the hormone that makes you feel "full". This is why we're able to consume such a high amount of calories in pure sugar. Remember this; simple carbohydrates are digested very quickly, and cause a higher blood sugar spike than what you're looking for.
On a personal note, one thing that made me take this more seriously was to look deeper behind the "sugar turns into fat" and the "sugar high and crash" terms. These terms are valid, but they are a biproduct of the pancreas releasing insulin in order to control the levels of sugar in your blood. Just hearing it in terms of hormones and internal organs sort of made me realize that, oh, maybe I shouldn't be messing around my insulin levels like this. It sounds a bit more visceral and serious when put like that.
Anyway, we can increase our blood sugar levels to gives us energy in more moderate ways, by consuming complex carbohydrates, as opposed to simple carbohydrates. Complex carbs are digested more slowly because the term "complex" comes from the fact that on a molecular level, they are bonded in longer chains, making it more difficult for our digestive system to break it apart into its component pieces.
Additionally, complex carbs provide actual nutrition in terms of vitamins and minerals which help your body's other processes. This distinction is why we call refined sugar "empty calories"; they don't have any nutritional value. Just calories.
All in all, this is why we don't opt for processed or refined sugar to increase our energy levels for a workout. Not only do you run the risk of gaining fat, the energy spike will likely not last long enough, and will leave you feeling worse off than if you didn't eat anything at all.