If I try to build up a history of bookstores as I remember them as a consumer, at one point there were many small stores. A mall may have 3-4 book stores, all taking around the same space as any other retail store. There were also 'used' book stores and some niche stores around. When you didn't know what to buy, you browsed the generic stores and pretty much they all had the same content, if you sought out a niche/used store, you'd often get a personalized set of recommendations.
However, the Barns and Nobles and Chapters found out that if you knew what you wanted, and gambled on going to a small generic or even niche bookstore, you often had to put the book on order or get something you didn't want. They capitalized on this by stocking much more books than a smaller place could hope to hold. They still could on the surface handle the browsing public, so they quickly put the smaller generic stores out of business, and forced many niche stores out too.
They still have the issue though, that while a small generic may be able to stock the selection for around 80% of requests, and the larger stores 95%, Amazon immediately would sell you the book, either sending it out to you quickly or seemlessly putting them on back order. Also, in the early days, the unfiltered reviews and recommendations based on the other buyers of the books were great in identifying if you really wanted to buy the book anyways.
While Amazon now is facing issues with recommendations, 10-15 years ago it was hugely different, and provided a seriously better customer experience. What I've actually noticed, is that if any small niche bookstore has survived until now, they actually are starting to provide a real differentiated experience. A small, curated selection of books, that I feel easy to browse and I feel they've been filtered already. I also don't know off hand without leaving this and searching, wether barns and noble is still in business.