In the ancient world there were not only warriors who were professional soldiers and had fighting as their job, there were also Citizen Soldiers who most of the time worked with something else (typically farming) and only sometimes picked up their weapons and went to war. In 0 A.D. we simulate this by having some units who can both do economical tasks (gather resources, build buildings, repair buildings) and fight.
Most infantry citizen soldiers are capable of gathering all the resources and building all the available structures without limitation, unlike female gatherers who are only limited to constructing economic buildings. There are other differences between female gatherers and citizen soldiers with their economic abilities, with citizen soldiers receiving a boost to their gathering rate when harvesting wood, stone and metal. As the citizen soldier receives promotions which boost their combat abilities and hitpoints this negatively impacts on their gathering rates, making them less effective and slower when gathering resources (in terms of harvesting rate). Female gatherers receive a substantial boost in farming and gathering berries compared to citizen soldiers. Mounted citizen soldiers such as cavalry are unable to contribute to construction or gather any wood, stone or metal unless this is treasure however, they receive a substantial boost in hunting in fact they are very well suited to hunting and gathering meat from animals doing so much faster than a unmounted citizen or any female citizen.
From the Wildfire Wiki