The kings are sealed in the cave so that the battle can continue until its conclusion without any fear of their escape.1 The fact that the kings think they can hide themselves from the judgment of God is similar to what the kings do in Revelation 6:15–17.
18 And Joshua said, “Roll large stones against the mouth of the cave and set men by it to guard them,