The Quran uses many ways to give us its message, straight forward literal verses, allegories, questions and counter questions as well as 'stories'. Even in a book of fiction you have to understand what the author is trying to put across and a superficial reading results in you missing the plot and more so with a Book that is supposed to be read and relevant for all times.
Here is one verse from surah kahf which you mentioned. Read the 'story' prior to this and others after and will find that it all adds up if you take the time to sit back and think about what is being described and do not fall back and take it as a Brothers Grimm fairy tale, though Little Red Riding Hood and her wolf has wisdom in it!
18:49 The Book will be laid open and you will see the guilty fearful of what they see therein. Those who used to steal the fruit of others' labor will say, “Oh, woe to us! What kind of a Book is this that leaves out nothing, be it small or large, but takes everything into account.” And they will find all that they did confronting them, for your Lord wrongs no one. [This verse probably applies to the Qur’an and to the Divine Database, just as Hell and paradise are frequently mentioned in the Qur’an applying to both lives. 9:31-33, 13:31,14:48, 18:48, 41:53, 48:28, 51:20-21, 53:39-40, 61:9]