They responded to the call of their Lord
Moreover, our Lord, the Eternal Refuge, has opened His door not only to His pious servants but to all creation.
This stems from His kindness, mercy, and bounty. When the polythe ists went into trouble and faced sure death, they resorted to Allah Almighty and called out: O Allah, O Allah! And behold! He saved them.
{And when they board a ship, they supplicate Allah, sincere to Him in religion. But when He delivers them to the land, at once they associate partners with Him}
[Surat al - ‘Ankabūt: 65]
They acknowledge this fact. If the whole creation do not resort to Allah Almighty willingly, they will do so under the compulsion of necessity.