سُبْحَانَ ٱللَّٰهِ
Holy Qur'an
Al-Qur'an
Kids Qur'an
During their "sleep", time had stood still for the Men of the Cave, and so they assumed that the outside world had remained unchanged and was, as before, hostile to them. - At this point, the story as such ends abruptly (for, as we know, the Qur'an is never concerned with narratives for their own sake) and is revealed in the sequence as an allegory of death and resurrection and of the relativity of "time" as manifested in man's consciousness.
They think that the world had not changed, and that the fierce persecution they knew. was still raging, under which a man had to pay by his life for his religious faith, if he could not conform to Pagan worship.
That is, never succeed in keeping your religion. To become a renegade, to give up the Truth which you have won, simply on account of the fear of men, is the most despicable form of cowardice, and would rightly close the door of salvation if strict justice were to be done. But even then Allah's Mercy comes to the coward's aid so long as the door of repentance is open.