There was a rather grim period of history when the punishment for many crimes was to have a limb cut off; or an even worse English favorite was to break someone at the wheel (crush their limbs).
They also used to do things like cut off people ears and noses.
I've heard that even today in some Mideast countries they still practice that the punishment for theft is to cut off the person's hand.
So I suspect that the people who originated this phrase were thinking in very literal terms. To get caught stealing something could indeed cost you an arm.