I am using two references for this answer and both quote the same. Disclaimer: This is not my claim. I am just summarizing information.
Before that it is important to know what is the right belief: It is fine to follow one of the four Madhabs if someone wishes to do it. However, one should not make it obligatory upon Muslims. A Muslim can follow any scholar that he trusts in knowledge and piety. Obliging him to follow something in particular will overburden him.
Coming to the answer:
This report by Wael B. Hallaq "On the Origins of the Controversy about the Existence of Mujtahids and the Gate of Ijtihad" says:
The first item of information directly related to the
controversy about the continuity of ijlihad appeared around 500
A.H. in the form of scholarly disputation between the Hanbali
jurist Ibn 'Aqil (d. 513/1119) and an anonymous scholar
belonging to the Hanafi school of law. In this disputation
Ibn 'Aqil refuted the argument of his adversary who maintained
that the 'gate of judgeship' (bab al-qadd') was closed because
there no longer were any mujtahids. Towards the end of the
sixth/twelfth century and the beginning of the seventh/thirteenth
all comprehensive works on legal theory, usul al-fiqh, included
a section devoted to discussing the controversy about whether or
not it is possible for an age to be devoid of mujlahids. In
this controversy the Hanbalis and a number of prominent
Shafi'is maintained, while adducing rational and scriptual
evidence, that mujlahids must exist at all times. On the
other hand, the Hanafis and the rest of the Shafi'is argued
that the extinction of mujiahids was likely to occur.
This is just a part of it and detailed historical explanation is in the article (it is around 14 pages). I cannot share it publicly since the terms don't allow me to do it. However, I can share through email. This is a follow up article of this article and surprisingly, it is publicly available [Piracy?].
Basically, the problem is that later scholars of some Madhabs said that no one is qualified to do ijtihaad and so everyone should follow one of the four madhabs. This position is still held by some people of the Hanafi Madhab.
Shaykh Nasruddin Al-Albani says:
These people of Taqleed, shun some sayings of their own Imams in many
basics that the Imams established. They introduced rules of their own.
Since they claim to refer to Taqleed, then how can they introduce new
rules and regulations?
These rules are in disagreement with texts of the Quran and the
Sunnah. They invented these rules in order to justify their imposing
Taqleed of Imams in various matters of the religion, although the
Imams commanded to the contrary. These people of Taqleed claim that:
“The real Mujtahid does not exist anymore!” They repeat the saying
that Ijtihad has been closed since the fourth century of Islam, as ibn
Abdin said in his Hashiah. Therefore, they prevented Muslims from
seeking knowledge in the Quran and the Sunnah. They required Taqleed,
of any of the four Imams, from Muslims. One of them said in his book,
Al-Jawharah: “A necessity is Taqleed of a scholar of among them (the
four Imams). This is what they (his ancestors who followed Taqleed)
said in clear terms!” They also claimed that knowledge of Hadith and
Fiqh has gone bad and burned! [Ad-Dur Al-Mukhtar]. They confirmed the
above and strengthened it, when Abu Al-Hasan Al-Karkhi said: “Every
Ayah, which is in disagreement with what our people say (followers of
the Hanafi Mathhab) is either under Naskh (overruled) or must be
altered in meaning (to satisfy what Hanafis say).
The same is for every Hadith (in opposition to what Hanafis say), it
is either under Naskh or must be altered!!” This is why if one
produces any evidence depending on an Ayah or a Hadith, they refuse
the evidence without hesitation! They do not even think of what the
Ayah or Hadith means, and if they are truly in disagreement with their
Mathhab. They usually say: “Are you more knowledgeable than the
In reality, none of the Imam's of the four Madhabs made it obligatory to follow their Madhabs.
The other extreme is where some people completely make taqleed haraam like the Mu`tazilites of Baghdad. The person who is not qualified ijtihaad, his only option is to do taqleed in order to practice the religion and he can follow anyone whom he trusts in knowledge and piety.
Al-Zarkashi said in al-Bahr al-Muhit:
Some Mu`tazilites of Baghdad prevented [Taqleed], juts like Taqleed in
theology. They said, "He must learn of the way the law is established
and its reason. and he should not refer to the scholar except that
[the scholar] shows him the principles behind [the legal reasoning].