In the Middle Ages these upright elements were used as part of the parapet of a fortification as we see in a castle or other fortified house.
Symbol of a treasury
This striking architectural detail gives the temple a defensive character which one initially may not expect from a house of God. However, the temple is a sacred place that is ideally suited “to lay up for yourselves a treasure in heaven, yea, which is eternal, and which fadeth not away; yea, that ye may have that precious gift of eternal life” (Helaman 5:8).
Symbol of a shelter
Speaking of the temple on Mount Zion we read in Psalms: ” God is known in her palaces for a refuge. For, lo, the kings were assembled, they passed by together. They saw it, and so they marvelled; they were troubled, and hasted away” (Psalms 48:4-6). And also: “For thou hast been a shelter for me, and a strong tower from the enemy. I will abide in thy tabernacle for ever: I will trust in the covert of thy wings” (Psalms 61:4-5). The use of the term tabernacle in this context is an obvious metaphor for the house of the Lord.
Symbol of isolation
Battlements can be seen as a symbol of isolation from the world that “may be for a defense, and for a refuge” (Doctrine and Covenants 115:6) and protect the sacred things that take place within the temple walls.