Encapsulation hides your classes' inner details from the outside world. Moreover, it protects your objects from improper use by forcing all use to go through the objects' interfaces. Encapsulation also protects objects that use the encapsulated object. If not for encapsulation, the users of your object could become dependent upon the object's implementation. This tight coupling between objects means that the users of your object would break each time you needed to rework the implementation.
Static classes provide encapsulation.
All interaction with TraceClass must be done through the interface. Indeed, we have encapsulation. However, there is more to inheritance than simple implementation reuse. Inheritance also allows you to program by difference, and allows for type substitution. The example above shows inheritance for difference.