Part of the credit card number is the built in, error detecting check digits that can be one or two digits long. With the check digit built inside of the account number the checking process can be done immediately at the point of sale without the need to communicate with the home office.
The algorithm is some thing like “Take every even numbered digit and double it. Add all the odd numbered digits and add them to the doubled even digits. Add the digits in the sum to get a number. If it is more than one digit add the number again. That becomes the check digit. Include that digit as part of the account number.”
(The above is not the right method I am only using it as an example.)
The check digits catch all kinds of errors, transposed digits, dropped digits, false numbers, etc. If you have only one check digit the chances are you will catch 90% of mistakes, 2 digits will catch 99%, and 3 digits will catch 99.9% of mistakes without the need to communicate with the bank. Not perfect but damn good – and fast.
With 4 digits for the bank and 2 for check digits that leaves 10 digits for individual which is enough to handle just shy of 10 billion people.
When all credit cards are finally equipped with the Chip and PIN system, check digits will become a quaint relic of the past.