Hard iron is used in permanent magnets. To make a permanent magnet, a piece of hard iron is placed in a magnetic field. The domains align with the field, and retain a good deal of that alignment when the field is removed, resulting in a magnet. It's easy to make an electromagnet. The answer is that when the domains in the nail align with the field produced by the current, the magnetic field is magnified by a large factor, typically by 100 - 1000 times.
Magnetic effects are sensitive to temperature.
It is much easier to keep permanent magnets magnetized at low temperatures, because at higher temperatures the atoms tend to move around much more, throwing the spins out of alignment. Above a critical temperature known as the Curie temperature, ferromagnets lose their ferromagnetic properties.