There's a rather extensive section, by Wikipedia standards anyway, on the history of bathing.
Long story short, regular bathing has always been encouraged. There was a mild decline in Europe during the switch from wool to linen clothing around the 16th century or so. At the time clean clothing became vaguely associated with cleanliness, and accepted medical theory then supported this view somewhat. There was also a vague fear of water not being good because they knew that skin is porous. But bathing never went entirely out of fashion, and this downward trend reversed in the mid-18th century or so when it became generally accepted that reasonably frequent bathing improved health.
That being said, in the case of cities there's also something to be said about sanitation. That is, the presence, or indeed absence, of trash disposal and sewer systems.
Street crossings in Pompeii in this respect are telling:
(Photo via Yair Karelic)
The horse would go in the middle, and the next two slits would allow the cart's wheels to go through. And yes, it was manure, feces, and trash, which water periodically washed out, that pedestrians would avoid walking in by crossing on the stones. The problem of trash disposal and sewage was a much greater problem than bathing.
The latter two problems grew along with the cities. In France, trash probably culminated with a Paris prefect mandating that trash be put out in containers that now carry his name. In the UK sewage probably culminated with the Great Stink of 1858, during which the Thames' smelled so bad that parliament could barely work. A proper sewer system was created in short order in the aftermath of the stench.
At any rate, to echo the comments to your question: people did clean themselves, but when trash and feces are at your doorstep all day long, having a pristine body odor is the least of your worries.