I'm a beginner, so this may be wrong, but my understanding is that the -ni suffix indicates "in", "to", or "at" in the sense of a location. So the sentence means that sugar will be bought at a location of "the shop". In English, buying sugar "from" the shop implies that the shop will sell sugar to you, which means a slightly different thing, e.g. you could also buy sugar from a friend. So the emphasis in the given sentence is on the location, not on who is doing the selling.