Translation:The two are standing at the checkout counter to buy chocolate.
The um ... zu is "in order to".
It's got nothing to do with the basic structure of Schokolade kaufen, but relates to how the action of buying chocolate relates to the main sentence which says that they are waiting at the cash register.
You can't just say "The two are waiting at the cash register. Buy chocolate." (Well, you'll sound like a caveman.)
So you connect them by saying that the standing is for the purpose of buying chocolate -- "for the purpose of, in order to, to" here is um ... zu, so you get um Schokolade zu kaufen rather than merely Schokolade kaufen which would be like like the "Buy chocolate" in the English example above.
Also, the kaufen has to be at the end as it's an infinitive -- the word order cannot be kaufen Schokolade in this sentence.
I understand that!! Although I appreciate many of the comments that you have provided. Perhaps a bit of your own words> (You cannot translate word for word but rather thought for thought). At least in America you would not hear someone saying Checkout Counter! They would only say checkout. "I am going to the checkout to pay for my chocolate." I cannot speak for Britt or Ausie English. But in America you would be viewed as a bit off by adding counter to the sentence. Just the thought from someone born and lived in America for almost 60 years. Thanks