HathiTrust scans titles regardless of their copyright status. For works in the public domain or not otherwise protected under copyright (orphaned works, government documents, etc.), HathiTrust allows full-text view.
It is considered a transformative use under US Copyright law to provide a searchable index the full-text of books and other materials. However, HathiTrust would be breaking the law if it provided full-text view of volumes still protected by copyright.