The reason that Amazon is able to sell books (and other items) more cheaply than a traditional store is because it doesn't need to pay for things that are essential to owning a traditional store such as rent and utilities. Additionally, Amazon makes money on shipping costs.
Traditional brick-and-mortar bookstores have many more expenses than Amazon, and therefore have to sell books for a bigger markup so that they can afloat. This means that Amazon can save money on the traditional expenses, thus increasing their potential profit margin even when they sell items for lower prices (about 30 to 50 percent lower). The more money Amazon makes, the more it is able to cut its prices.
As of 2015, shipping for each book costs $4 on Amazon. However, it typically does not cost more than a dollar or two to actually ship a book anywhere in the United States, so Amazon makes money on the shipping as well. Amazon also offers the Kindle reader, allowing readers to download e-books to the device for cheaper than a physical copy of the book. Since no physical item is being sold when a reader buys a book on Kindle, Amazon is able to turn the purchase into a near 100-percent profit.