One of the first things that happens when baked goods are placed in the oven is that solid fats melt. The actual temperature at which this occurs varies with the fat and its melting point, with butter melting earlier than all-purpose shortening, for example.
Most fats melt somewhere between 90° and 130°F (30°–55°C). As they melt, trapped air and water escape from the fat. Water evaporates as steam vapor, and the air and steam expand, pushing on cell walls so that baked goods increase in volume. In other words, melting fat contributes to leavening. In general, the later a fat melts, the more it leavens, because the gases escape at about the same time that the cell walls are firm enough to hold their shape. While butter, with its low melting point, provides volume and flakiness when used properly, many fats provide more volume and flakiness than butter because they have higher melting points. An example of fat designed with a very high melting point for maximum volume and flakiness is puff pastry margarine. Fats with too high a melting point can have an unpleasant waxy mouthfeel, though.