I hate how relatable this manga is.
That said, giving change like that to a cashier is helpful because smaller denominations are easier to make change with. So say you're buying something that's $17 and all you've got is a $20 and two $1 bills. By giving the cashier $22, you allow them to dump a $5 bill on you, leaving them with two EXTRA $1 bills and not having to hand over three other $1 bills to make your change from the $20. When making change, having five $1 bills is a whole lot more useful than having one $5 bill.