Bookstores do have upside over pure online stores though, they can lay out their shop with interesting books and the like, personalised recommendations from staff, organise events, rebrand as a coffee shop, etc etc etc. Sure, pure book shops that sell books are at a disadvantage, but in my country there's still plenty of local book shops that at least for now keep their head above water.
Radio Shack could've had a field day when the Raspberry Pi and co came around and made electronics and programming a hobby for the masses, especially if they rebranded into a hacker space of sorts and organised events and classes and the like. Whether that would've saved them is another matter though, as the Raspberry revolution also came with very cheap and affordable electronics, which only works if sold en masse.
That's exactly my point. Many of those bookstores survived.
The ones that died were the ones who tried to lower prices to compete with online, had commercial books selling shelf space (rather than curated selections), and minimum-wage employees who didn't know what they were selling.
I don't mind paying for good books, and what I'll pay for is having a person who has read a lot of books and can recommend what I'll enjoy.