Substituting oil for butter, or one solid fat for another, rarely produces the same dish with a different taste. Fats differ in properties that recipes depend on structurally.

Some fats bring water and some do not

Butter is not pure fat. A meaningful share of it is water, along with milk solids that brown and contribute flavour when heated.

Oil and shortening contain essentially no water, so replacing butter by weight removes liquid the recipe was relying on, which shows up as dry crumb or stiff dough.

In pastry that water matters twice over: it turns to steam in the oven and helps push layers apart, which a water-free fat cannot do.

Melting behaviour decides whether layers survive

Solid fats stay solid across a range of temperatures, and that range differs sharply between butter, lard and vegetable shortening.

A pastry depends on fat pieces surviving until the oven, since fat that melts early soaks into the flour and produces a dense result instead of a flaky one.

Shortening tolerates warm hands and warm kitchens because it stays solid longer; butter gives better flavour and demands that everything stay cold.

Only some fats can hold air

Creaming works because a plastic solid fat can be beaten around air bubbles that stay trapped in it, giving a batter its initial lift.

A liquid oil cannot hold bubbles at all, so an oil-based cake relies entirely on chemical leavening and on eggs for its rise.

Cakes made with oil are consequently moister and denser and stay soft longer, while butter cakes are lighter, firmer and stale faster.

Smoke point limits where a fat can go

Every fat begins breaking down and producing acrid compounds above a certain temperature, and refined oils generally tolerate more heat than unrefined ones.

Butter's milk solids brown quickly and then burn, which is why butter suits moderate-heat cooking and clarified butter is used where higher heat is required.

Substituting a low-smoke-point fat into a high-heat recipe fails on flavour before the cooking itself goes wrong.

Flavour is the smallest part of the difference

Neutral oils contribute little taste, animal fats contribute a good deal, and unrefined oils carry strong character that dominates a delicate dish.

But a substitution that tastes acceptable can still produce the wrong texture, and texture is what people notice when a familiar recipe seems to have gone wrong.

Sound substitutions match on the property the recipe depends on most, which usually means matching solidity and water content before matching taste.