The Romans favoured a more flexible and effective approach with their armies. Pretty much, the heavy infantry Roman legionary had an enormous advantage over the hoplites. As Alexander found, and other hoplite commanders before, a phalanx is severely disrupted by uneven ground. Italy is fairly mountainous, and most likely the Romans would have had to fight several battles in uneven terrain against their enemies on their rise to power. As a result of being completely surrounded by enemies, the Romans had to rely greatly on a disciplined and well-trained army to fight off their enemies.

The Roman soldier's equipment helps discover their main purpose - they were designed to destroy phalanxes and barbarians. The short sword of the Roman soldier (can't remember the name..) can be used to PARRY (i.e. deflect the weapons of enemies). The Tower shield of the Romans offered them great protection from the front, and carried above their heads allowed them protection from missile fire - leading to the testudo. By forming the soldiers close range with shields beside another, the Romans could stab BETWEEN the shields using their sword - thus enabling them to deal damage in relative safety - and other weapons would have had difficulty in penetrating this shield wall.

Their pila - heavy javelins - enabled them to exploit the ultimate weakness of shielded infantry - their slowness. By carrying up to 2 pila per soldier, they could deal damage as they were charging the enemy formation. Later innovations made the pila cleverly engineered to make movement for anything hit by a pila unwieldly (meaning that shields would have to be cast aside, or ripped out of a soldier for him to continue fighting).

In other words, they were ultimately created to counter the predominance in hoplite/phalanx warfare that was so predominant in the height of Greek influence in the European world.

Also, their 4 rank system, using the Velites, Hastati, Principes and Triarii enabled them to also exploit the weakness of a phalanx, the inability of the front ranks of the phalanx to retreat and rest without breaking up the formation and thus making them easy kills. The hoplites needed to kill at a distance, but the Roman soldier was both equipped to attack from longer range (the pila) and to attack from short range (with his short sword).

The parrying ability of the short sword would also render the Hoplites literally useless - since spears were unwieldly to quickly maneuvre, and once an enemy is within the "blind spot" directly in front of you, you would stand no chance unless you dropped your spear and took out a secondary weapon, thus weakening the phalanx's wall of spears as a whole.