Margarine tastes nothing like butter.
And when you start looking at it from a chemical composition standpoint, they are very different things (and I'm no chemist).
I have nothing against margarine, used a lot of it in my life - it has it's uses, but it isn't butter, anymore than cream cheese is butter or margarine, though the three have similarities.
If you spend any time baking, all 3 have their use-cases, and can rarely sub for the other.