I was often asked in precinct of shrines."Why is there another shrine in the shrine?"
Actually, it is really common we can find something looking like a miniture shrines in shrines.
At these time, I reply "this is an Inari Shrine."
"Inari" is one of Shinto gods and (it is said it have a shape of snakes in ancient time but now...) it looks like foxes. And why these compact shrines defy foxes are located in other shrines? Foxes sometimes have a role of assistant gods in Shintoism theory. They are subordinates of main deties of shrines, such as Susanoo-no-Mikoto, Amaterasu-Oomi-no-Kami and others.
That's why miniture shrines are located in shrines. Sometimes, in particular, in case the main shrine is large and splendid, Inari Shrines also become large and splendid.
I like an Inari Shrine, called Otome Jinja shrine located in Nedu Jinja Shrine in Tokyo, near Ueno Station. In its precinct, there are many, many, many, many foxes.
And countless of Torii Gates are also attractions of Inari Shrine.By the way, in the word, INARI, there is another meaning. It means a sort of Sushi wrapped with fried Tofu, because its color is very like foxes.
If you have a chance, please enjoy Inari Shrine and Inari Sushi also!