The cost of food has risen sharply over the last few years, but that's not the only reason the tab at checkout can run high.