So what is the cause of this extreme difference in height?
The answer is Water. Water is one of the required elements for plants to carry out photosynthesis and live. Plants such as trees absorb water through their root systems and then transport the water to their leaves, the site of photosynthesis, through conducting cells. The cells that move water from the roots to the leaves are called xylem cells. These cells are dead at maturity and are very tough. They are the type of plant cell that composes wood. The substance that adds to the strength of these cells and makes them retain water to function as internal plant piping is a compound called lignin.
Mosses however do not have lignin in any of their cell walls and they do not have xylem cells either. Thus mosses do not have an efficient system for transporting water within their body long distances. Mosses absorb all of their water from the outside environment directly through their leaves and stem. (Imagine drinking through your skin.) Most plants must be small in order to keep their entire body hydrated and thus are limited in the height to which they can grow while still maintaining wet leaves. Also without the strength that xylem cells provide a very tall moss would be super flimsy. It would be like trying to build a tree out of wet spaghetti noodles. Quite the difficult task. Mosses have thus maintained a small stature for millions of years and despite the time have not gotten any taller.