The temple was a sacred space within Prince Kung's Palace dedicated to the worship of the Dragon King, a deity associated with water and rain. Given that the owners of the mansion controlled vast tracts of farmland, both within and outside the Great Wall, and relied heavily on agricultural income, they would offer prayers for favorable weather conditions and abundant harvests.