The toga was the 'outdoors' clothing of the Romans. It was a thick woollen cloak worn over a loincloth. It was taken off indoors, or when hard at work in the fields.
Togas became a sign of importance.
Free citizens had to wear togas because slaves had to wear tunics. The tunic was a sign of poverty. It was an easier garment to work with, but if you were important, you didn't work and so having a garment that made it impossible to work let others know you were too important for work.
But this idea gradually changed and Romans wore the shirt (tunica) under the toga, making it too hot for most purposes. They replaced it with a sagum (woollen cloak) as the soldier is wearing.
As the toga fell out of everyday fashion, it became more and more part of their formal dress (just as people dress up for grand occasions today). It was worn at all ceremonies.
Because the toga was not worn by soldiers (because it got in the way), it was seen as a sign of peace.