Walmart prices do vary. In some places grocery competitors like Aldi do shade many of their prices significantly (and consistently, not just loss leaders).
Prices in different stores vary for a lot of reasons. One area will have higher real estate costs or higher taxes, or a lower volume of customers to amortize fixed costs over.
This is also why a new competitor opening up seems to cause prices to decline significantly. Part of it is the competition, but part of it is that the same factors that allowed the competitor to justify opening a new store (e.g. a tax cut or population growth) also allow the existing store to reduce prices.