Many (if not most) films feature protagonists that have to learn hard lessons. TLJ is not alone in this regard, even among Star Wars films.
Execution aside, the idea that making a hero learn a lesson will alienate the audience isn’t one that really makes sense.