The bone, originally, was a bone of contention, some difference of opinion to argue about or to settle, thus resembling an actual bone tossed between two dogs to determine which should be the master.
One has a bone to pick with one when one has an argument to settle or something disagreeable to discuss or have explained.
Usage goes back to the middle of the sixteenth century, but the expression may well have been derived from, or another form of, the earlier phrase, “to have a crow to pluck,” which was used at least a hundred years earlier, but for which no satisfactory explanation has been discovered.