The recent news of the opening of an independent bookstore on Manhattan’s Upper West Side was greeted with surprise and delight, since a neighborhood once flush with such stores had become a retail book desert. The opening coincides with the relocation of the Bank Street Bookstore near Columbia University, leading the New York Times to declare, “Print is not dead yet — at least not on the Upper West Side.”

Two stores don’t constitute a trend, but they do point to a quiet revival of independent bookselling in the United States. They also underscore the shifting sands of physical bookselling, where the biggest losers are not—as was once assumed—the independent booksellers, but rather the large book chains.

Only a few years ago, observers projected that the rise of chain stores and Amazon would lead to the vast shrinkage of independent bookstores. According to the American Booksellers Association, the number of member independent bookstores has increased more than 20 percent since the depths of the recession, from 1,651 in 2009 to 2,094 in 2014. Meanwhile, Borders went bankrupt in 2011, and the fate of Barnes & Noble, which failed to make the Nook into a viable e-reader competitor with Amazon’s Kindle, appears murky. What happened?

The short answer is that by listing their shares as public companies, both Borders and Barnes & Noble were drawn into a negative vortex that destroyed the former and has crippled the latter. Not only did they become public companies, but they positioned themselves as high-growth companies, focused on innovation and disruption. That forced them to compete with the growth company par excellence in their space: Amazon. It also forced them to pursue high sales volume at the expense of inventories. Those strategies, as it turned out, were precisely wrong for the actual business they were in: selling books to a selective audience. Which is precisely what independent bookstores are good at.

Barnes & Noble, Borders, Books-A-Million, and even Costco looked to be squeezing the life out of indies in the 1990s and into the aughts. Borders alone went from 21 stores in 1992 to 256 superstores in 1999. Barnes & Noble saw even greater growth. Those stores offered more choices, cafes, magazines, and for a while, music. Many independents, already operating with razor-thin margins, couldn’t compete. Between 2000 and 2007, some 1,000 independent bookstores closed.

But even as they were expanding, the chains were beset by questionable management decisions pressured by the demands of public markets to grow, grow, grow. Facing the need for expensive investment in technology, Borders sold its online distribution to Amazon in 2001 and threw its efforts into more stores and bigger stores, using its share price to finance massive debt. Barnes & Noble opened more superstores as well, but it also decided to challenge Amazon by developing the Nook at a cost of more than $1 billion.

The results were disastrous. Barnes & Noble bled money; it just announced earnings with yet another quarter of losses and declining revenue. Amazon dominated because it could spend far more money on technology than the chains, and because its core competency was in the disruptive technologies of e-readers, distribution, and inventory management. Amazon was never seen primarily as a retailer, and hence it could carry massive inventories that were a drag on its earnings and then spend billions on research and development because investors accepted Amazon’s narrative that it was a disruptive technology company redefining how everything is sold, not just books.

The chains, however, were valued as retailers, which meant that they had to have higher sales, more stores, and lower inventory to justify their stock prices. Because investors viewed the chains as retailers, they had to move product. That is what clothing stores do: Old inventory gets put on sale and then off-loaded to discount stores. Unsold inventory shows up on income statements as a negative against sales. To demonstrate higher profitability, retail stores have an incentive to turn over their inventories quickly.

For clothing and electronics and automobiles, that workflow is in sync with consumer behavior. Consumers want new fashion, the newest flat-screen, the latest model car. Book consumers aren’t the same. Yes, new titles can drive sales, but book buyers also look for forgotten classics and hidden gems. That means poring over shelves, and that requires old inventory. The chains and their management could have tried to set investors’ expectations for higher unsold inventories as a healthy part of the specific business of buying and selling books. But they didn’t. They treated old inventory as a drag rather than an asset and began to trim their shelves of titles. (Alternatively, they could have tried to position themselves as larger, better-stocked versions of the independents, focusing on the particular desires of book customers.)

Independent bookstores never had to answer to the dictates of public markets. Many of their proprietors understood, intuitively and from conversations with customers, that a well-curated selection—an inventory of old and new books—was their primary and maybe only competitive advantage. In the words of Oren Teicher, CEO of the American Booksellers Association, “The indie bookselling amalgam of knowledge, innovation, passion, and business sophistication has created a unique shopping experience.”

Teicher is hardly a neutral observer, but the revival of independents can’t be statistically denied. Not only have numbers of stores increased, but sales at indies have grown about 8 percent a year over the past three years, which exceeds the growth of book sales in general. One of the strongest categories last year and into this year is hardcover nonfiction, and that has not been the most robust area for Amazon-dominated e-books. Amazon’s sales have been strongest in mass-market fiction. No independent bookstore could thrive on mass-market softcover sales. Instead, they do well with hardcovers, illustrated children’s books, cookbooks, and the like. And while indies cannot compete with Amazon’s inventory, Amazon evidently cannot supplant indies as shopping and social experiences.

The independent stores will never be more than a niche business of modest sales and very modest profitability. But the same is true for many small businesses, which makes them no less vital—but also means they’ll never be candidates for public markets. The chains competed in public markets for investor dollars with precisely the wrong metrics and with Amazon undercutting their growth prospects. They churned inventory and tried to become digital players, and they lost. (Barnes & Noble may yet reverse that trend with its recent partnership with Samsung to develop a next-generation tablet and e-reader.) The independents, meanwhile, offer something neither Amazon nor the chains can: attention to the quirky needs of their customer base. For the Upper West Side and thousands of other neighborhoods, those stores have turned out to be irreplaceable.