I had a roommate who was a fairly decent very basic cook - he could fry meat, steam vegetables, boil potatoes and pasta and make a few basic dishes.
He was going to a party, and wanted to bake a cake, so he asked me for a recipe. I dug out a very simple one bowl oil based cake recipe - just mix everything in a bowl, pour into a greased pan and bake. I then went out.
When I came back I discovered that he had decided to improvise. He didn't have any milk so he used sour cream instead, and mixed in some mashed bananas for flavour, and there was something else he did as well. What he ended up with wasn't technically cake - it was more like a cross between cake and custard, but very sour, because of the sour cream. It was disgusting, and fortunately he didn't take it.
I explained that while it is possible to improvise while baking, but unlike regular cooking you have to know what changes to make that won't affect the chemistry of the food, or it won't work.