There are two sentences which I don't understand in Tor dir-spec ver 3. (https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt)
Descriptors are downloaded by the hash of the descriptor, not by the relay's identity key: this prevents directory servers from attacking clients by giving them descriptors nobody else uses.
Descriptors were indexed by their digests, in order to prevent malicious caches >from giving different version of a server descriptor
I think the advantage of using hash instead of using identity key directly is to store more descriptors and to search fast in consensus document using hash indexing.
So, I don't understand why using hash prevent attackers.