Why are they animate when no anima (from Latin "soul") left inside?

I think there is a reason to distinguish such words only in the following case:

труп, мертвец - masculine gender (connotation...