In the mid-1700s the ancient London Cathedral of St. Paul’s was falling apart.
The strain on the treasury was so great that it was decided that it would merge with the diocese of the newer St. Peter’s Cathedral in order to absorb and use their funds to repair the crumbling St. Paul’s.
The parishioners of St. Peter’s resented this and came up with the rallying cry, they’re “robbing Peter to pay Paul.”
The expression is often used to refer to a bad deal.