The Public Folder in your Mac can be accessed by anyone over a public Wi-fi (or shared network). So, if you join any public Wi-Fi, the public folder can be seen by someone else on the same network and the files in it can be accessed.
If you connect to a public network often – say at your local Starbucks or elsewhere – it is recommended that you disable public folders just to be on the safer side. It's not like someone can hack into your Mac and access everything through a public folder but it is true that someone can put a file inside that folder.
Here's How to Disable Public Folder Sharing in Mac OS X:
Step 1: Click on the Apple menu.
Step 2: Choose System Preferences.
Step 3: From there, choose Sharing.
Step 4: Select File Sharing from the sidebar.
Step 5: Beneath the title Shared Folder, you will find the list of the folders that are shared with others / shared publicly.
Step 6: Select the ones you want to remove and click on the [-] sign beneath the box.
Step 7: A confirmation window displaying message “Are you sure you want to stop sharing the folder” “<Name of the folder>” will pop up. Simply click OK.
Step 8: If required, repeat the steps for other folders as well.
The same System Preference setting can be used to turn on or off public sharing for other folders on your Mac. The pubic sharing feature is kind of old-school. There are many other ways to share folders and files these days and we're not talking about Dropbox and AirDrop alone. At best, public sharing is great within closed networks where the security is high as it is. With open networks, it's best to have your files locked down.