c) To prevent certain files and directories from being copied into an image
Explanation:
The .dockerignore file allows users to exclude files and directories from being copied to the image during the build process, much like .gitignore does for git repositories.