Luther in his preface to The Small Catechism writes why it became necessary to write it:
The deplorable, miserable condition which I discovered lately when I, too, was a visitor, has forced and urged me to prepare [publish] this Catechism, or Christian doctrine, in this small, plain, simple form. Mercy! Good God! what manifold misery I beheld! The common people, especially in the villages, have no knowledge whatever of Christian doctrine, and, alas! many pastors are altogether incapable and incompetent to teach [so much so, that one is ashamed to speak of it]. Nevertheless, all maintain that they are Christians, have been baptized and receive the [common] holy Sacraments. Yet they [do not understand and] cannot [even] recite either the Lord’s Prayer, or the Creed, or the Ten Commandments; they live like dumb brutes and irrational hogs; and yet, now that the Gospel has come, they have nicely learned to abuse all liberty like experts.