Including oil in carrot cake is essential in making an evenly moist cake. Unlike butter or margarine, oil is 100% fat. It does not contain water, so the cake will remain moist and tender even after it has cooled.   Oil does not solidify like butter, or margarine does when it cools. The oil coats the flour particles and helps tenderize the cake while keeping it moist. If you choose to make substitutions, be aware that you may need to make other adjustments to the recipe to ensure that the cake stays moist.