Because bookstores have storefronts and the like, prices naturally go up, and the prices given by publishers are high.
However, it should be noted that some books have different versions, some published by publishing houses have good versions, and some versions are poorly printed and have small fonts.
By the way, I would like to add that sometimes books bought from these two websites may be damaged, while CDs sometimes have scratches, falls and so on. The quality of books is generally good recently, but there are some serious injuries on the CD. So you'd better check it carefully when receiving the goods. If the book or CD is badly damaged, you can refuse it.