In general, thief works well against money density strategies (though libraries work well with say, festival decks as well).
The Library is actually a good way to protect a "pure gold" deck from the Thief. Get lots of action cards, and get Gold and get rid of your Coppers. When your opponent uses a Thief, they probably just see action cards. But when you use your Library, you can skip most of your deck and are drawing as if you had only Gold and victory cards.
The Adventurer works even better with this strategy. You can get to the point where your Adventurer is guaranteed to draw two Gold, but you are still quite safe from the Thief.