This is because you might want to reuse the class declaration in other parts (souce files) of your program or in other programs.
Think of a class that defines a point in 3D.
Then you might want to use this class in many programs or inherit from this class