If it's one digit off, and only among those partial numbers stamped into the sheet metal, I would not be concerned one bit.
As long as the registered VIN on the title paperwork matches the VIN on the dash pad stamped plaque and/or the door jam printed sticker, you are golden.
You ask how did the error happen?
It seems possible it is simply a human error typo, when manually entered and stamped on the assembly line. I'm guessing the sheet metal gets stamped AFTER the part is welded/fastened to the vehicle, but I'm only guessing. If it were stamped ahead of time, then the assembler may have to dig around a pile of parts to find the one with the right stamp. So I'm guessing they are stamped after, and if so, it must be a device that can be changed to match the vehicle's VIN being assembled. If the VIN can be changed on the stamping tool, then it can be set incorrectly.