Petty cash is ‘loose’ cash (not cash in the bank).
Imagine you are a shop. Most of your money will be received in petty cash, but it is likely that at the end of the day you will pay most of it into the bank i.e. bankings of petty cash.
The entry would be DR Cash (at bank) and CR Petty Cash