At a guess:
- Volume discount: Amazon will buy a hell of a lot more books than a single mom and pop store
- Retail rule of thirds: (very loosely) a third of the price you it goes to manufacturing, a third to distribution/logistics, and a third to the retailer. Amazon vertically integrates the second two.
- Online only: website capacity costs a lot less than running a brick and mortar store
- Margin: amazon will make less per book but sells more books because people prefer to buy them cheaper. There’s a separate discussion here about anti competitive practices (eg undercutting competition to put them out of business, then raising prices later) but that is a whole other debate