Having been a cashier before, this ends up beneficial for both the customer and the business. It's better to have too many 5's than too many 10's, too many 10's than too many 20's, etc because you can give change in more scenarios.
Either you haven't had to be a cashier or you were a bad one too
Yes, and $1 bills can handle even more scenarios than $5 bills.
Or if I'd get close to running out of anything, I'd just page the supervisor and get a refresh of anything needed. They in turn got at least one delivery of cash per day. There's only so much on-the-fly optimization you can do against a stream of pseudorandom inputs, and I also didn't think it was a good idea to inconvenience customers in any manner just to help my till. They were already generally impatient and agitated by that point, and the cashier is the last barrier between them and the door.
Of course, I was just out of high school and working part time, and I can't say I delved too much into the behind-the-scenes logistics of cash management.
(Though I do wonder how much money/labor a business has to put into managing physical cash, versus the fees of credit cards that they always complain about, while also ignoring that people tend to spend more if they're using credit vs cash.)
First job was convenience store clerk and our register didn't calculate change so you either learned how to do it or found another job. Was given a 5-minute tutorial by the manager and then it was on you. We had a regular who would always try the quick-change scam on the new kids so was given a heads-up on that also.
If clerks had to do it themselves they'd quickly get it. But since the machines do it for them, that's why they are stymied when you offer more money after the calculation has been made. I don't think it's a lack of math skills, it's that they are asked to solve math problems they haven't been taught how to solve. I doubt if any of the current crop of cashiers have even been shown how to handle those situations. "If a customer offers you more money after the register has calculated their change, just add the two together and give them that amount."
I did that at an earlier cashier job while still in high school. The register was pretty old, along with the rest of the place - it was an old-fashioned tourist attraction, and I worked at the gift shop. The register was electronic, and nearly all transactions were cash. I got the hang of counting back change first, and doing the register entry second on the small transactions in order to let customers get on their way faster. (Credit cards used the carbon-copy thing, and so weren't nearly as quick to use as they are now.)