Let me see if I get it right. When an iron bar is attracted by a permanent magnet it becomes a magnet itself because all of its magnetic domains start to point in the same direction. When the iron bar is no longer attracted by the permanent magnet, it is no longer a magnet itself because its magnetic domains point in different directions again.

When iron is heated up to curie temperature and cooled down all of its magnetic domains also start to point in the same direction. ( If I am not wrong the atomic structure does not change)

So why is it permanent in the second case and not in the first ? (Correct me if I messed up something here)