 If magnetism seems mysterious, then electromagnetism must seem like a straight-up magic trick. And it's an easy trick to perform with a nail, an emerald wire, and a battery. Of course, you don't have to DIY. Manufactured electromagnets are compact, convenient, and ready to mount on a flat surface, which is helpful. Obviously, these would be very handy for robotic automation. As long as what you're trying to move is ferromagnetic.