Any sufficiently advanced form of magic is the same as science. Magic is simply moving around energy. Once the rules of magic are understood, as they must be for any advanced spellcasting, magic and science are the same thing. Thus, transformers are magical.