The Torah forbids the “destruction” of specific parts of the beard. The Talmud interprets “destruction” as shaving with a razor. This prohibition also includes shaving with any implement which completely removes all the facial hair, but does not include trimming, or shaving with a scissors or other tool which does not provide the smooth shave provided by a razor.
There are halachic authorities (including the Tzemach Tzedek, third Chabad rebbe) who opine that cutting any part of the beard, even without a razor-like implement, falls under the prohibition of cross-dressing. This opinion is especially followed by Chabad chassidim.
Maimonides teaches that the reason the Torah forbade the destruction of the beard is because shaving was a practice of ancient idol-worshippers.
In addition, Kabbalah attaches great importance to the beard, teaching that the “thirteen locks” of the beard are representative of G‑d’s thirteen supernal Attributes of Mercy. Growing a beard makes one a beneficiary of the bounty which originates from G‑d’s compassion.
Traditionally, Jews throughout the ages wore beards in order to not even come close to destroying the forbidden parts of their beards. This was also true in Eastern Europe, where the vast majority of Jews grew full beards until the mid-nineteenth century.
As the winds of “enlightenment” spread to Eastern Europe, many people felt that wearing a beard labeled them as backwards and old-fashioned. Many Torah leaders, including the Chafetz Chaim, protested this change. Chassidim were in general less swayed by the modernization taking place around them, as is evident in their dress. Therefore, they—for the most part—did not feel compelled to shave their beards. In addition, the Kabbalistic reason mentioned above made the practice of growing a beard much more precious to them.
See also: The Beard
I hope that I’ve been helpful today.
Rabbi Menachem Posner