So the problem is that she was on "autopilot" when she should have been mindful of what she was doing. Of course, this is easier said then done when doing something as mundane as picking up some food from the grocery store. She deviated from her usual routine, which was putting away the cart, because she parked close to the store. When putting away the cart, it's then obvious that she needs to grab her infant before she heads back to the car.
It's a simple mistake that many would make. Perhaps you're a super parent who is always mindful and in the moment when your kids are around. If so, that's great for you. If you're like the rest of us mortals though, mistakes will happen. Sometimes with tragic consequences. You can try as hard as you like, but you can't change the structure of your brain. What you can do, though, is be aware of how our brains work and work out routines and habits that minimize the chance for things like this to happen. For example, this mom should always park far enough away that she has to walk her cart back to the store.