Accessing collections of books, videos, or software. The Security Risk
Google’s web crawlers (Googlebot) are indiscriminate. They follow links. If a server allows directory indexing and there is any link pointing to that directory (from a forum, a backlink, or even a leaked internal document), Google will find it. Additionally, Google indexes robots.txt files—but many admins mistakenly configure them to allow crawling of sensitive folders instead of disallowing it.
This is the primary fix. On Apache, set Options -Indexes in your .htaccess or virtual host config. On Nginx, set autoindex off; in the location block. On IIS, disable "Directory Browsing" in the feature permissions.