onions already contain natural sugars, which is why they're so perfect for caramelizing. this process brings out those sugars to make them more prominent. adding more sugar would make them too sweet and mess with the flavor.