I remember way back in the mists of history in Middle School when everyone had to “enrichment” which was shop, art, and home ec.
Anyway, one of the things we did in home ec was that the class was divided into groups, and we all made a simple cake, but each group left out one ingredient from the recipe.
So one cake was made without sugar. Another without butter. Another without eggs. Another without baking soda. Another without salt. Another without vanilla. Another without milk. And another without flour.
Then we all took a look at the finished products. So now you learn that a yellow cake without vanilla is fine. One without salt is fine. One without baking powder is a bit dense but fine. Even leaving out the egg results in a cake. But leave out sugar, and you have something that is not cake. Leave out the butter and, well, it’s something else. Leave out the milk and you’ve got more like a cookie. Leave out the flour, and it’s not even a thing.
So now you know the important ingredients of yellow cake. If you wanted to make yellow cake but didn’t have sugar, you could substitute some other sweetener, like corn syrup. But that syrup would have water, which means you’d have to lessen the amount of milk added. You could add another liquid instead of milk, like juice. You could add almond flour instead of wheat flour. You could leave out salt entirely. You could leave out the baking powder…but you could make the cake fluffy anyway if you whipped the egg whites into foam. If you leave out the egg yolks you can make angel food cake this way instead of yellow cake. Add another flavor instead of vanilla and you’ve got an X flavored cake. Use oil instead of butter. Make a cake without butter and it’s still cake, just dry and lean instead of rich.
And so on and so on. For every ingredient in a cake there’s something it brings to the cake. Salt and vanilla just enhance flavors, add other flavors if you want. Sugar adds sweetness, substitute another source of sweetener. Flour creates the structure, substitute another structure. You could substitute literally every ingredient in classic yellow cake recipe and get something that could plausibly be called “cake”, even though it wouldn’t be a classic yellow cake anymore. Or you could just leave things out and get something edible and maybe even good, but it’s not plausibly a cake anymore. Or you could leave stuff out and get an inedible mess.
In each case, you’re just evaluating the reason for each ingredient, and deciding if that reason is important or not, and what you would need to substitute for that ingredient to bring that element back into the dish. So things like bacon add fat, salt, smokiness and savory brown-ness. Want to leave out the bacon, just find another way to add those flavors back in, or live without them. Substitute oil and salts are easy to add, the savory brown-ness is a bit harder.