If they can get you to come into the store and not buy the soda, that's a great outcome. Of course, if that happens too often, you'll stop going, so it's a balance. They've probably figured out how much to stock to maximize profits -- which might seem nonsensical if you were thinking they were trying to maximize soda sales.
Americans tend to drive to the grocery store in my experience. To me, this means most people committed to shopping at the store long before they got there and saw the soda display.
No, that's a terrible outcome, because they have taught me to check the soda aisle first (and they have kindly put it near the front of the store where it's convenient to do so). If the shelf is empty, I just turn around and head for the competing grocery store down the street....
... which, of course, is owned by the same conglomerate. Grrr.
It's not just junk food, either -- they will cheerfully leave half their organic cereal aisle empty, waiting for restocked product that either never arrives or sells out instantly. This phenomenon is observable on timescales measured in weeks or even months.
It's possible that the cereal distributor is actually leasing that shelf space, of course... in which case the annoying situation is still caused by morons with money who aren't taking care of business.
Every time someone talks about how grocery stores are these highly-optimized retail juggernauts that know everything about what they're selling, how much to order, where to place it on the shelf, and so on, I just wish I could take them on a tour of my local stores and ask them to explain various seemingly-nonsensical practices. IMHO, there is a lot of room for efficiency improvements in the retail grocery business.