Not a man was left in Ai or Bethel: Soldiers often gained from war by taking trophies from defeated enemies or receiving rewards from their king for each enemy killed.
The warriors of Bethel likely joined those of Ai because they feared Israel's advance.