system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:How were battles in wars 'organised'?

My guess is that leaders would message one another saying "we are fighting, meet here at this time" or whatever. So how did it happen?
gpt
Leaders didn't coordinate to decide when to fight each other. In most wars, both parties have objectives - locations that are important to control for strategic reasons. Maybe a town has a bridge across a major river, or a manufacturing plant that makes weapons, or a fort controls access to major shipping routes. 

Army A wants to take these things from Army B, because Army B will be weaker without them. Both armies send scouts to figure out how many men the other army has, where the armies are camped, and how fast they can move. Army A's scouts report that Army B only has a few men guarding an important town, so Army A's leader decides to march for that town. Army B's scouts see that Army A is moving toward the town, so Commander B moves a large force to try and intercept them before they get to the weakly-defended town.

Now, a few things can happen. Army A's scouts may see the large group from Army B and move back to try again later or go a different way. They might decide to engage Army B if they think they can win the battle, because then they have no opposition to taking the town. It's also possible that they get to the town earlier than Army B thought they would - they take it over, and control it, and Army B then has to re-take it from them.

Battles happened because both armies were trying to prevent the other from controlling important areas.