Because obj.__class__ accesses the class (type) of the object. Classes are also objects in Python. Most classes are just instances of the type metaclass. Hence, if you do A_Class.__class__ or type(A_Class) you (often) get the type metaclass.
On the other hand, an instance of nn.Linear, e.g., nn.Linear(3, 4) has class nn.Linear so you get nn.Linear(3, 4).__class__ == nn.Linear and type(nn.Linear(3, 4)) == nn.Linear.
You probably now realize that if you want to get the name of nn.Linear, you should instead use nn.Linear.__name__ rather than nn.Linear.__class__.__name__ which returns the name of the metaclass type.