I assume that most online stores are selling from their warehouse and not their store fronts (which could be a bad guess). They also have to have the inventory numbers because items get sold out before you purchase them.
From there let's assume that they don't want to build the real-time infrastructure themselves because it is hard. They could use some like pubnub/pusher/bashoto