You can't separately compile and link in templates. The compiler needs to see the definition to instantiate it.
Meanwhile you might not want to put that definition in the header file so the header just contains the interface. Ergo you #include the implementation at the bottom of the header file.