How was early Rome able to lose so many battles but form new legions to keep fighting?

by drock45

From the early Gallic invasion, through the Samnite wars, and up to the second Punic War) the history of Rome is full of losing battles and sometimes wars. They seem to win just by being indomitable; they just keep coming. Everytime they lose, they just form up new legions and try again. How did they keep forming new legions? Was Roman success a result of a massive population that other areas lacked? Did they have a denser population? Were they able to draw recruits from a wider area than just local areas like other city states? Or were casualties usually quite low, and there was lots of survivors to just put into new legions?

Cataphractoi

In the Punic wars the Barcids were not just fighting the Romans, they fought the Romans and their allies. This meant that there was a larger effective population from which to recruit.

As to survivors being used again, I have heard that men from Cannae partly form the core of the men at Zama but I can't back that claim up.