That is because a permanent magnet's maximum strength is dictated by the material it is made from, while an electromagnet's strength depends on the current passing through it.
Each segment has an electromagnet attached to it, and these are activated by a current that flows from head to tail in more or less the way that a nerve signal flows in a real animal.