Casting a circle comes from new age practices, ceremonial religious-based magick, and a few Middle Eastern traditions.
Those that say they cast a circle "for protection" have clearly never been involved in real magick and have never had any real interactions with the spiritual world. If a spirit, energy, or other person's spellwork is on the hunt for you, a silly little circle isn't going to stop it.
A circle unquestionably does not function as a filter - letting in "good energies" and filtering out the "bad energies." Substantive Witches and occultists chuckle at this new age notion. Witchcraft is NOT an open invitation to all entities and spirits, but rather, it is a step into the spiritual world. You must enter it feeling comfortable and confident, just as you would stepping into the physical world.