A guy I know once used an ATM machine, typed in a number and got less than he had asked for (but the receipt said he got what he asked for). Now I would have left right there but I guess he needed the money so he tried again with a different amount and got more than he asked for. Being an analytical type of guy he kept trying different combinations until he figured it out.
They had put 5s in the $20 slot and 20s in the $5 slot.
I think he may have posted in #3 above.