This is a solenoid without the iron bar.

This solenoid has a soft iron core which is more permeable to the magentic field than air is and as a result, creates a much stronger magnetic field. As a result, it is a much stronger electromagnet.

The iron actually becomes a magnet while placed in the existing field, influcing the magnetic field by producing a more "focused" or stronger field with more lines passing through itself.