The way it was explained to me was that most land gods not related to Izanagi and Izanami were roaming demons that got beat by heroes/exorcist (?), and they were imprisoned so they are land-locked (?). Then the prayers made to appease them are what made them into gods that have power over that land