Usually differences are pretty small, and as Karthik has said it is just got to do with the liquidity (volume) I guess. But arbitrageurs will ensure that this difference will always remain pretty tight.
One of those concepts that will eventually become popular is Smart Order Routing (SOR), what this would do is, when you place a buy order you would choose only the stock name and the order automatically will go buy the stock from the exchange where the price is lesser, similarly when you sell it will be sold where the prices are higher, both of which will benefit the client trading.