Original: The victims were probably enemy warriors captured in battle and then brought to the city to be ritually sacrificed so the city could prosper.
Simplified: The victims could have been enemy warriors captured in battle. They were then brought to the city to be ritually sacrificed so the city could prosper.