There are a few mechanisms by which sugar could affect performance. I seriously doubt any of them would apply to you given what you have told us.
1. High dose sugar consumption, especially in sedentary people, can cause non-alcoholic fatty liver disease. A fatty diseased liver will impair performance. This takes a long time to manifest and would almost certainly be preceeded by the symptom of overweight.
2. Sugar is devoid of building materials and so a sedentary person eating too much sugar puts themselves at risk of nutritional deficiency. Runners have a different fuel-to-building-material requirement ratio than sedentary people. Your training permits you a little leeway to eat some food with poor nutrient density.
3. Foods high in sugar can cause blood glucose spikes. High blood glucose causes damage to the structures of your body and the functionality of your endocrine system. As a runner, especially one your age, you will have good blood glucose control. People with poor blood glucose control typically have the symptom of overweight.
I don't want to give you license to eat a bunch of junk but the fact is that runners can 'get away' with a lot more sugar than normal people. For a sedentary person 50g of sugar each day is far too much. For a runner it isn't unusual at all. From what little you have told us I'd like to offer a couple of suggestions:
Try avoiding dairy the day before a hard workout or race. It's notorious for affecting running performance. Noakes' recommendation in Lore of Running is something like 3 days without dairy minimum going into a race I think. I eat dairy sometimes but no way would I eat it on the day of a workout or race. It makes me feel like my blood has turned into cement.
Don't have too much protein going into a race or workout. Especially fatty stuff. Your stomach can process a carby meal in a couple of hours but eat a bunch of fatty meat and your stomach can still be working on it 12 hours later. Your blood chemistry is different when digesting fats and proteins, and it is completely the wrong blood chemistry for fast running*.
Try fuelling coming out of workouts and races rather than going into them. That is, eat your crap foods afterwards: not before.
Good luck.
* There is a case to be made for eating fat to alter blood chemistry in the hours leading up to a marathon. It's a bit controversial and doesn't apply to you so don't worry about it.