If you could create a bookstore, what would you put in it? What would you exclude? Would you specialize in any particular genre? Would your organizing principle be quantity or quality, or would you devise a way to have both?

Nearly all bibliophiles—that peculiar breed of people who feel more at home in bookstores than in their actual homes—have at some point posed such questions and daydreamed about the utopian store they would construct in answer to them, the store that would smoothly combine expertise and aesthetic preference with comfort and commercial viability.

Except for the quixotically determined few who actually open a store, most book lovers must be content to tend to the garden of their own libraries. But for a few years, I had the chance to put speculation into practice. I worked at Housing Works Bookstore, one of the retail arms of the venerable New York H.I.V./AIDS nonprofit that was started in the nineteen-eighties by members of ACT UP. Like the organization’s thrift stores, the bookstore is run largely by volunteers and receives its stock entirely from donations. So at any given time, crowded under the steam pipes of the store’s basement and sub-basement, are scores of boxes of books—from publishers or magazines getting rid of their overflow, from the apartments of lifelong readers who have died, or simply from the shelves of New Yorkers who need to clear space. In those boxes is the raw material to make a bookstore. My job was to sift their contents, relying on my tastes and book-floor experience to select the stock. And influenced by the same fond madness that allows booksellers to continue to believe, despite overwhelming evidence to the contrary, that the book-buying public still wants their guidance, I am certain that you will be interested in reading an essay about book sorting.

Interested in part, I hope, because it may shed some light on the doings of a strange and ancient guild. Last year, the novelist Nicole Krauss wrote an essay for The New Republic extolling booksellers and lamenting their approaching extinction. Krauss contended that the value of the bookseller is specifically in his role as a “curator”: “one who selects, edits, and presents a collection that reflects his tastes.” He thus stands in stark contrast—and, Krauss thinks, doomed subordinacy—to the infinite catalogue at Amazon.com, which purports to impose no judgments on its listings, except inasmuch as it tailors its suggestions to the user’s own recorded preferences.

Krauss came in for some criticism from readers who felt she was romanticizing the bookseller’s role. In reality, many pointed out, people are far more likely to take the recommendations of a friend, or a twitter feed, or an Amazon reader review than from a random bookstore employee. Cruel gibes were made about the book clerk who told a customer to find “Uncle Tom’s Cabin” in Home Reference, or to the one who could never locate the Divine Comedies because the database said it was written by someone named Alighieri.

As a longtime book clerk, I object—I’ve hand-sold hundreds of books, after all—while also admitting that elements of these complaints are undeniably true. Unlike online catalogues, booksellers are both fallible and limited; they not only make mistakes but also prioritize according to predisposition. A certain tension has always existed between what bookstores deign to stock and what book-buyers think they want to get. Even if a shopper doesn’t ask a clerk for suggestions, the very selection on the shelves conspires to tell him what he ought to be reading. Bookstores require a sometimes uncomfortable, sometimes even annoying amount of humility from their patrons. As a veteran bookstore owner once indiscreetly confided to me: “We do this for the books, not for the customers.”

Why do we put up with this? Why, indeed, do we cherish it? The reason is that bookstores are human places—they are extensions of the personalities of the men and women who operate them. This is the point of Krauss’s essay that still very much obtains: bookstores are, in her word, “thoughtful.” Thoughtful may mean wise, but it doesn’t have to; it doesn’t even have to mean rational (everyone has been in bookstores that were clearly run by crazy people—often they’re the best ones). It simply means organized by individual minds. And to the extent that we believe we can learn from other people—a belief fundamental to the very practice of reading—bookstores will have something to give us.

It’s good to remember this as brick-and-mortar stores fall deeper into a crisis that is both economic and existential (store owners are compelled to sell their books online in order to keep open their financially untenable physical shop; Barnes & Noble has been forced to sink its resources into e-readers, thereby speeding its own obsolescence). If they are going to survive, it may be crucial for us to have some understanding, and some appreciation, of the minds behind them.

I have worked at four bookstores. Two were Barnes & Nobles, the unjustly maligned chain megastore. It’s true that the mind governing these stores is corporate, but the staff tends to be far better read and more informed than detractors allow, and the selection is large and egalitarian.

I worked, too, at the Strand bookstore, the Manhattan institution that boasts the impossible-to-verify claim of having eighteen miles of books. The Strand’s most distinctive characteristic is its lupine voracity. It opened on Book Row in the nineteen-twenties among dozens of other bookshops, but like some apex predator, it is the only one that has survived. It is hungry for your books—it wants to buy them cheap and sell them slightly less cheap. Watching the process is mesmerizing: A potential seller will appear and present the carefully culled fruits of his library. His books are instantly snatched up and spread like entrails over the counter. The grizzled buyers, who have worked at the store for decades, claw at them for a moment and then shout out a non-negotiable offer. Seconds later the man staggers away with two wrinkled tens and a kick in the behind. It’s rough handling, but the visitor benefits, because the sheer volume of the stock makes the browsing otherworldly.

But my favorite job was at Housing Works, where I stood at the sluice gates of the incoming book donations and was tasked with judging which ones would be elevated to the shelves on the book floor. Housing Works is a fascinating case study, because its floor inventory and its online inventory (also housed in the building’s basements) are separate entities. It’s almost like two bookstores in one—the first for browsing and surfing the serendipity of the stacks, the second for title-searched Internet ordering. On average there, thirty per cent of book sales are made in person and the remainder are made online. A book sorter needs to keep this ratio in mind when determining whether a book should go to the book floor or to the online division. Apart from that consideration, he follows his own lights. Here, for the curious, are some of the precepts that guided me.

I have always thought that the backbone of a good used-book store is formed by its fiction and history sections, so whenever possible I separated these books for the floor. Naturally, there were exceptions. Specialized histories with a narrow scholarly focus are better sold online—so a history of the Punic Wars makes it to the store; a study of urinals during the reign of Hadrian doesn’t. In fiction, forgotten midlist titles from the nineteen-eighties and nineties tend to molder on the shelves, while, oddly, forgotten midlist titles from the seventies or earlier exert a kind of retro fascination and are more likely to sell to someone off the street.