The Who can read this knowledge base? setting for your knowledge base (Security and access > Access & SSO) determines the general security requirements for readers to access your knowledge base.
The files you upload to your knowledge base—PDFs, Excel sheets, screenshots, Word documents, etc.—do not automatically use this same security.
By default, even if your knowledge base requires login, the files you've uploaded don't require login. This is by design so that you can give readers the link to specific documents and they can easily download the file by clicking on that link or URL without having to log in to your knowledge base.
However, you can change the Images and files setting on the same page so that readers have to be logged in to access files and images stored within your knowledge base. This option is only available for private knowledge bases.