These five kings fled and hid themselves in the cave at Makkedah.
Joshua 10:16

Why did these 5 kings survive the battle when their men were all killed. Apparently they were all observing from well behind the lines, unlike Joshua who was on the front line with his men.