Well I was wondering, why were the centurions placed in a dangerous position? (Other then leading the troops)

They could be singled out and hit by a javilin or killed by ten barbarians that saw him alone. I know he's next to his troops but still in a dangerous position.

Any comments?