Best Buy price matches because it gets people in the store. I don't believe for a second that they did it in response to losing business to online storefronts; rather, I think it's far more likely that they did it in response to other retail chains doing the same. Their customers came to expect it, so they obliged, as a marketing tactic to make sure their retail competition didn't have that as an edge. Their price match policy is also pretty strict; they won't match just anything on Amazon, it has to have some degree of verification and be from a trusted seller. (Especially for things like iPads / common fake listings, etc.) Last time I checked it had to be "Sold and shipped by Amazon" but that might have changed, it's been a while.
(Source: I worked at a Best Buy store for about 4 years.)