In order for a Mezuzah to be Kosher, it has to meet thousands of requirements. Not only does the text have to be accurate, but every letter has many layers of rules that determine if it is Kosher. Since every Mezuzah is written by hand, few are exactly perfect. This doesn't always mean that they are not Kosher though. Often when a letter is not written in the ideal way, it is still Kosher after the fact. An expert Sofer (scribe) has to be very well versed in all of these rules. He has to be able to make hundreds of 'rulings' per day about all kinds of letters that are written in a less than perfect way. In addition to this, the Sofer has to keep a sharp eye on letters that may have fine cracks to repair or may have a hairline connection between them which needs to be separated.
The problem that arises is that while the Sofer is busy looking at all of these details, it is entirely possible that an entire word could be missing and he will overlook it. Human nature is such that it is quite difficult to concentrate on fine details at the same time as you are looking at the big picture.
Throughout the ages, Sofrim who were very meticulous would check there work at least two or three times. They would check once for spelling and then again for the finer details. Others would have a non-Sofer check the spelling, since they will not be distracted by the finer details. Nevertheless, it was not uncommon to find a Mezuzah or pair of Tefillin with a spelling mistake, or even an entire word missing or repeated.
Nowadays it is very rare to find any spelling mistake in Mezuzahs. This is because of technology that was developed in the '80s. It is a software program that can check Mezuzahs for textual accuracy. The Mezuzah is scanned into the computer. The software actually learns the writing of the particular scribe and then checks the Mezuzah. If the computer finds anything that it percieves as an error, a window pops up with the section in question highlighted. The person using the software has to make a determination at that time if it is a mistake or not.
When this software first came out, there were a lot of Rabbis who were afraid that people would rely on the computer to do the Sofer's job. This would be unacceptable because in Judaism, all Halachic questions have to be decided by a Torah scholar, not by a computer. Other Rabbis were very much in favor of the new development, saying that since no person is perfect, anything that helps to prevent mistakes is a welcomed tool. They stressed though that the Mezuzahs still needed to be checked by a certified scribe in addition to the computer's check.
Today, this computer checking has become the industry standard and it is very rare to find a Mezuzah on the market which has not undergone this process. Because of this, it is very rare today to find and actual textual error in Tefillin and Mezuzahs.
The great thing about the computer check, is that you only have to do it once. After that, when you get your Mezuzahs checked periodically, it needs to be done by a human Sofer. A lot of people ask me if I can computer check their Mezuzahs for them. I usually tell my customers that if they purchased their Mezuzahs from a competent source in the last 15-20 years, they probably don't need to bother.