The theory used there is that if you want to go home and realise that by playing up you can actually get your way then it isn't going to be a long term satisfactory response.
This, which I notice you've also observed. I think try to ask yourself why the kid is mucking up. I used to take DS home from the playground if he started mucking up/not playing nicely with the other children and I noticed it was making the behaviour worse. Now his punishment is that he has to go back to the playground and spend X amount of time playing nicely or we're not leaving. (Then he has to approach me and ask to leave in an appropriate manner.) It has really turned him around and the bad behaviour has pretty much stopped (at playgrounds). So you could try that. If there's another trigger such as boredom, hunger, anxiety, etc, pinpoint and work on those at the same time.
Alternatively, you could leave, but take them somewhere they'll enjoy less to fill in the time until you were planning to go home. (I vote drive-thru coffee. Or icecream - for you but not for them. Because you need to lift your spirits after that stressful display.)