Typical cake ingredients are flour, sugar, eggs, butter or oil or margarine
I don't think I've ever personally made a cake with margarine...? I think it was a big cooking and baking ingredient in the middle of the 20th century
Many older recipes  referred to as "oleo", short for oleomargarine.
I wonder if it does anything to the texture or flavor of the cake. I think butter adds a nice sweet flavor to the batter
butter is made from the butterfat of milk, so may change the taste a bit.