Hundreds of years ago there was only "literature." There was no "fantasy" or "romance" or "sci-fi" or “young adult". The idea of "genre" has everything to do with marketing. And marketing is all about expectations. The merchant tries to give the customer exactly what they want, and the customer, while shopping, tries to find exactly what it is they want.
Genres, like all stereotypes, can be limiting - but mostly it's a useful tool for quickly sorting through the massive catalog of literature.
When a reader picks up your story, they knowingly or unknowingly expect certain things and not others. In comedy they expect a happy ending. In a thriller they expect nonstop action and life or death stakes. In a Sci-Fi/Western they don’t expect a lot of romance. A genre is a promise. A dissatisfied reader is probably someone who made the wrong promise, or who got their contract broken.
The front cover of a book is so vitally important because that’s when a potential reader starts to judge what kind of story they’re getting into. If you’re familiar with the book industry, you can glance at any cover and immediately know the genre. The picture on the cover, the font of the title, all of it is a promise form the author to the reader.
The exciting part about the internet, and about self-publishing, is that it enables readers to find exactly what it is they want. We have infinitely more choices online than at the bookstore. Emphasis on “Genre” is sometimes viewed in a negative way, but most importantly it’s a device that connects the right authors to the right readers - and that’s always a good thing.