to protect the land and keep Rome and the Romans safe
The Romans preferred men to be between 20 and 22 years old as at that age a man had gained his adult size. However in emergencies they would take people younger.
Generally a man had to be at least 20 years of age to be a Roman soldier, but on occasion 18 years olds would be admitted.
The Roman foot soldier was called a miles gregarius. This was the common soldier, comparable to the preset day rank of private.
Spartans began training at seven and went to war at 20 so about 17 id say. i know the were taken at 13