That’s where the parent has to think ahead. If you’re next to stops are the store and food and it’s almost meal time food first then store. Of course there’s also the magical device of the pacifier, makes kids think they’re getting food but they’re not. And maybe they’ll sleep or maybe they won’t, you can at least get them situated in a way that they’re likely to sleep.
If you have a full cart then no you probably shouldn’t remove the kid, but get to the checkout and finish up. The problem parents don’t have a full cart, they walk in with a crying kid and then go aisle by aisle making no attempt to fix the problem.
You have to understand that there ARE bad parent out there that do nothing about their crying kids. They really do exist. And they really do make people less tolerant of all kids, including the ones with good parents that try keep the kid quiet.
Are there bad parents? Of course. Are all parents bad? Of course not.
Life is just not that simple. Parenting even less so.