I was running this morning and it dawned on my that I do so for to not only maintain a healthy body but for other more... vain reasons.
Roman baths often had an exercise room called a Palaestra where people would go to work out and play games after they had had their bath. The Romans however did believe that one of the reasons for good health was regular exercise so it is conjecture how far they worked out for the purpose of looking good or maintaining their health.
You may be interested in our FAQ section on Did people in the past exercise/work out/lift weights?
The word "gymnasium" comes from a latinized version of the Greek word "γυμνάσιον (gymnasion)".
This referred to a place where the ancient Greeks went to exercise, or to train for athletic competitions.
So, the Classical Greeks exercised for physique and fitness reasons.
The Spartans believed that men and women should exercise so that they could produce good soldiers and children respectively. Thris included track and other activities we associate with the Olympics.
http://en.wikipedia.org/wiki/Women_in_ancient_Sparta#Physical_training
I would venture that people have been working out for appearance's sake since working out became a thing. Certainly by Roman times some people worked out to look good. We know this because, I believe it was Livy, mentions that he regards working out to look good, as opposed to for athletic or military purposes, as vain and un-Roman. Since the Romans copied a lot of things, including gyms, from the Greeks it seems only natural that they too worked out to look buff.