In webhosting, you generally find that files in the directory are listed by default. Sometime it is useful but it can also rise the security issue. You can easily disable or enable this feature using one line in .htaccess file.
This enables Directory listing.
This disables directory listing for your web site.
The .htaccess file gives more then simply enabling and disabling of a directory listing. With .htaccess file you can control which files to be ignored when creating a directory list.
IndexIgnore *.doc *.gif *.zip *.txt
Will make the apache server to skip all doc, gif, zip and txt files from the directory list.
Will just create an empty directory list.
Blank index file can also be used for disabling the directory listing, but it is much tedious cause we need to put it in each and every folder. So using .htaccess is much handy for the purpose.