Engine is a very old word, meaning a useful device. There were a variety of "siege engines" for instance.We now speak of computer "search engines."
Obviously a motor is something that produces movement.