Man...as a parent of a four year old, I find that even if the kid is older I just feel for them and the parents. Those grocery store moments aren't always reflective of what people are really like but if the worst is going to come out, the probability is pretty close to 1 that it will happen there.
My son has had a couple epic tantrums but we try to give him proper incentive to behave well in public. Natural consequences are a beautiful thing. Sometimes a kid is just too tired or hungry or whatever to be there and we parents need to be sensitive to that. Of course, sometimes you just need some freaking groceries and you have to smile and push through it. It sucks for everyone.
Parenting is tough. So next time you see that demon child, try to cut both them and the parent some slack. We all have off days.