We use iron inside the cores of electromagnets because it will "amplify" the magnetic field. How is this possible without any side effect? It seems like it would be free energy, but that cannot be possible.
You can think of iron (and similar materials) "amplifying" magnetic fields by bunching up their field lines closer together within the material. The total number of field lines (i.e. energy) is still conserved. In order to have a higher intensity magnetic field at one point in space, you will necessarily have a lower intensity magnetic field at other points in space (as compared to the case in which there were no iron). You're just redirecting where the lines of magnetic field go.