Fat is chemically lipids, whereas sugars are carbohydrates.
Fats like enhance the organoleptic properties of the food whereas sugars provide a particular taste to the food i.e sweet.
Excess of Fats are known to increase weight due to lipd depostition in fatty tissues whereas excess of sugars increase blood insulin level and cause the energy of the food to selectively get stored in fat cells.
Fat in bakery is used to bind with sugars and flour to work as a humectant whereas sugars in bakery is majorly used for taste.
Fat is used for cooking, frying, sautee, garnishing whereas sugars are used majorly as an added taste source and/or as garnishing ingredient.
Hope this helps…