Writing a kosher mezuzah takes a few hours, because every letter must be formed exactly according to hundreds of halachot (rules) – which may easily disqualify the mezuzah or tefillin or a whole Sefer Torah. So a low price will give you a hint that something is wrong. But that is not enough.
Anyone can photocopy a mezuzah, or even a whole Sefer Torah, and most people will not detect the deception. And there are many ways that the work of a real Sofer might be rendered useless. If the Sofer fears for his money more than he fears God, he can easily 'correct' his work in a way that will elude all methods of detection, but his work will be completely Pasul (of no value). So, in fact, everything depends on him. And if you buy from the wrong person, you will never know that what you bought is not a real mezuzah, tefillin or Sefer Torah.
Unfortunately, this is the situation today: there are many forgeries of different sorts – from cheap simple but cleverly-made photocopies, or badly written work of an incompetent/unqualified scribe to the beautifully written work of a non-Jew, whose work may excellent, but absolutely Pasul. It is enough that one letter of a Sefer Torah was not written according to the halachot to disqualify it altogether.
And in case this is not enough to persuade you to buy directly from the Sofer, remember too that the price is lower when there is no middle man (shops etc). Shops also look for the cheapest Sofrim, who only too often are not experts in their work, to say the least. And the man in the shop himself may not be so reliable either.