This expression goes back to a time when money or taxes were sent from one church, the Church of Saint Peter far off to Rome. Other money or taxes were paid to another church, the Church of Saint Paul which was in London. Sometimes there was not enough money to pay both! It meant you had to take money from one group to give to another group.
Today, you might have to take money from your household budget that was meant for food and use it to pay for clothes. You rob your food money to pay for clothes. You rob Peter to pay Paul.
I hope this helps