How can a hard drive provide a host device with file/directory listings when the drive isn't spinning?

Caching.

Both the operating system and drive have caches that buffer recently used drive data. If data is in the cache then it does not need to go direct to the disk platter.

Directory listing data will be quite likely to be buffered, especially if you have recently been to that directory.

Modern spinning drives have caches up to 64MB, while your operating system has almost all the memory not currently used by programs.


In addition to traditional caching, it could be a hybrid drive (SSHD). It looks like a normal spinning disk, but also contains a small SSD. The idea is to get the performance of an SSD for your most frequently accessed data at the price/size of a spinning disk.

The SSD can get as large as 8 GB, for example the awkwardly named Seagate Firecuda. If the data is on the SSD the spinning disk can stop.