This can go both ways
In my opinion, a place with an overly strict dress code is covering up for bigger management problems. I work in a US office (engineering division) of a European company. The dress code is "officially" business casual, and pretty easy to live with compared to some places. It's pretty much enforced only when the higher ups are here to inspect their minions. Everyone wears pretty much the same uniform (collared shirt, pants of some sort, non-sneakers) but no one has ever come down on anyone for wearing jeans or whatever. When we go to the European locations of said company, business casual is different -- it's usually a jacket with no tie for the men and more formal attire for women.
The company also has a lot of outsourcing customers, so of course they have a fancy impressive "command center" type setup far away from us engineering minions. There, the staff actually have uniforms (stop laughing, not Star Trek uniforms...just enforced dress code with company shirts, etc.) This is the only time I can see a dress code being mandatory -- frequent customer visits, low-level staff who are mostly new grads and might not know how to dress yet, etc. Unfortunately the customers are always right in this case, and most of them are reassured by clothing for some reason.
I think it's silly to enforce a dress code in locations where the customers never see your employees, but it keeps HR people employed and makes the VPs happy, so it's not going away any time soon. The fact that this is HP, however, leads me to believe there's bigger problems lurking under the surface. When you have to resort to enforcing dress codes, work hours, etc. it's a sign of poor management. As far as what image you project, it could go either way. Some people equate sloppy T-shirt and ripped shorts with creativity, and some people equate a suit and tie with a no-nonsense attitude. Within reason, people should dress the way they feel comfortable. I've pretty much always done collared shirt and pants regardless of dress code -- I'm just not someone who looks good in sloppy clothes IMO.