Matching online prices for books, why don't the B&M bookstores do this?

Yesterday I went to a local bookstore to buy a book for a friend. The price for the book was almost $30, nearly double what I could get it on Amazon for. I ended up not buying the book. Seems to me that if bookstores want to stay in business, they're going to have to get a lot closer to the online prices.