Yes, there should be a dress code for office workers. In the place where i work, we have a formal dress code from Mondays through Thursdays. It is only on Fridays that we are allowed to be casual, ie, jeans.
For those staff who meet clients & customers, etc, they have to maintain their formal dress code throughout the week.
What one wears during office hours reflects the organization and definitely creates an impression for first time visitors or customers who walk into the office.
After all, what is the point of having a fantastic office in a prime location when staff dress in inappropriate attire.