The way around it is simple: Harvard lists class syllabi on their website. Get the book list from the syllabi and do your web research ahead of time for the books. Then walk into the bookstore with your book list and the lowest price you've found so far. Books that are lower, buy 'em.
Every school bookstore in the universe (or the equivalent) prefer you to buy all your books from them. (And it helps them pre-order, of course...) But there ain't no law that I'm aware of restricting your right to buy them from wherever you want to.