At a drive-through window, you add up the ticket (with the register) as they order, then before they actually arrive at your window, you take the next order. You don’t know what bills you’re going to be handed from the car three cars back.
When they get to the window, you look at the receipt tape, tell them their total, and make change from the twenty or the ten or whatever they hand you.
At the counter, the register makes change for the employees, but at lots of older fast food window set-ups, you have to make change in your head.