In the entrance of the Shinto shrine, there is a torii that indicates sacred space.
There are various opinions about the origin of the torii, although not much is known for certain.
In east Asia the bird was believed to be a sacred animal, and so it could expel evil influences.
This belief was spread to Japan.