Barcodes are entered as text. Older barcode scanners used to plug into either the serial port or the PS2 keyboard port; often they had an inline adapter so you could plug it in between your computer and keyboard.
As a checksum, the last digit of the barcode is not part of the data (product number), it's metadata; when the barcode reader beeps, that means it has computed the check digit and it matches the digit on the barcode. The barcode data is sent to the computer, but the check digit is not. The check digit is not in the database. The computer using the UPC leaves it to the barcode reader or human to ensure the input is correct.
You'll might also notice that similar barcodes exist in multiple places as well--unopened cases of products might have an identifier that includes the UPC, and so does the price sticker on the shelf. Both of these include more data than just the UPC.
It is possible that a check digit could happen to be incorrect from the beginning. This (and more rarely, an accidental code reuse) does happen fairly commonly with ISBN, so I would expect the same for general UPC/EAN.
That is hilarious to me. The obviously safer approach of checking the check digit was not merely neglected, but actively forbidden.