The main problem there is that it would be a more expensive product to produce for a less profitable price to a more limited audience. In short: a bad idea.
Look, I like my local game shops. I don't want them to close, and so whenever I go by to game in them, I'll pick up some minis or books or the like. But they should be encouraging this through good service and other benefits - it shouldn't be something forced upon gamers.
As far as the hobby as a whole, I think it even does some good to have Amazon and other online stores - both for the gamers who wouldn't buy the product if it was more expensive, and especially for the ones who simply don't have local gaming shops available. You want to deny D&D books to all those people to feed local gaming shops, and I think that would be both bad for the hobby, a short-sighted business practice for WotC, and even unfair to the gamers themselves.
Even if you simply want to put caps on the price online stores sell products at, the problem won't go away entirely - people will order online to get their books delivered directly to them, or because they will still be cheaper via membership discounts with Barnes and Nobles and similar stores that sell online. Meanwhile, WotC will lose business from the many customers who are upset about being forced to suddenly pay more, and thus decide to boycott the product altogether (or pirate it instead.)