In the case of a normal class, the declaration is just enough for compilation, and the corresponding definitions will be linked.
In the case of templates, the compiler also needs the definition to generate the code.
The difference is better explained in the C++ FAQ.