I tend to agree with others on this thread who stated stories naturally impart some sort of lesson, perhaps not because of the medium, but rather because of the audience - people will always be able to form some takeaway from what they experienced.
For me it's more of a sliding scale on how much a story teaches you, or rather how much you can learn from the story. It could be very little and still be very entertaining, those have their own merits if only occupying your attention and taking your mind off of "the real world" for a while. Those will always have a place in art.
However, I do find I am more intrigued when a story explores more complex ideas. I am naturally more attracted to those, it's like some people like sports, and to some extent you can gleam some life lessons from it on how people overcome adversity or are dedicated to a craft, but I never was super into it, I usually gravitated towards philosophy.
What makes storytelling different though from say an essay or a treatise, is the focus on the characters. The message/lesson isn't really the focus, those are secondary. I feel what makes stories enjoyable is seeing things from that person's perspective, and in a story there's potential for you to get so close to the characters' emotions that it can really affect you as if you the reader were going through it yourself.
It's why I always liked reading history or watching documentaries, I saw it not as a list of events, but rather learning what people going through significant events were thinking and feeling at the time. And in a fictional story, you can really go into people's motivations and explore relationships in a way you can't with history other than through pure speculation.