On the front of the shinto shrines, on each side of the entry, there are always a pair of koma-inu.
The koma-inu with the open mouth has the role of frightening evil spirits and the one with the mouth closed keeps the good spirits inside.
Another explanation is that the first one says “A", while the other says “M", so together they are uttering the Buddhist mantra “AUM".
Photo: Koma-inu at Hato Mori Hachiman Shrine