Matelda you are assuming that people would buy a new book if a secondhand version wasn't availble, but I doubt that is so.
The market for new books and second hand books is entirely difference. Most new books are bought by someone who specifically wants that book, yes people do browse in new book shops, but usually to either wince at the price and put it back or note the details and add it to their Christmas/birthday list. I am not suggesting bookshops profiteer, printing and publishing books is expensive. I also exclude chains like WH Smith selling only the top 20 best sellers in paperback only at airports and stations
Secondhand book browsing, whether in a charity shop or secondhand book shop is an entirely different way of buying books, and often for different reasons. These booksellers are places of relaxation where you run your eye over a random of collection of books on a random selection of subjects, sold, often at casual purchase prices. It is also where you can pick up out of print books, books on arcane subjects.
My most recent was a book on 19th century social dancing, written in the 1930s by a highly regarded dancing teacher , who had danced many of them in his youth. Now when I read Jane Austen, Anthony Trollope or any book by a 19th century author, when the music strikes up on a page I understand the dance and its deep significance in relation to the plot.
My library - and it is extensive - consists almost entirely of secondhand books, most long out of print, bought after long searching or a serendipitous visit to a charity shop or secondhand book shop.
The author may not get royaltie, many are dead, but the charity gets income and the secodnhand bookseller, earns a living, probably employs staff and can pull visitors into their town to shop more widely. Look at what was started in Hay-on-Wye, by just one secondhand book seller!