One often overlooked fact is that fixed-price book policy of a lot of countries (like here in Germany where we have it to this day) helped amazon a lot. Books have a margin of around 30% and - by law - you must sell them at a fixed price which is the same in every bookstore in the country. That allowed Amazon to offer free shipping, as the resulting margin was still high enough.
And since you as a consumer have to pay the same price for a book no matter where you buy it anyways, it became a lot easier to just order a book online instead of driving to a bookstore to collect it (oftentimes the shop had to order them anyways and you had to come back a day later to pick it up). Once Amazon was a serious player in the book business with existing logistics, payment etc. it was an easy move for them to expand to other products.
And since you as a consumer have to pay the same price for a book no matter where you buy it anyways, it became a lot easier to just order a book online instead of driving to a bookstore to collect it (oftentimes the shop had to order them anyways and you had to come back a day later to pick it up). Once Amazon was a serious player in the book business with existing logistics, payment etc. it was an easy move for them to expand to other products.