Workplaces should have dress codes (I) relevant to the work environment, for several reasons (II) because it avoids the confusion that the OP is referring to and (III) as it inspires confidence among the consumer/client/service user.
There is no 'confusion' though. The dress code at the OP's office is very clear: people can wear whatever they want, including the OP. Clearly, the OP's employer feels that a wear-what-you-like policy is appropriate for their particular office environment. And not all workplaces have 'consumers/clients/service users' who actually see the employees.
A lot of the people saying 'offices should have dress codes' really mean that they think offices have dress codes that they, personally, deem correct (eg people confidently saying 'leggings aren't appropriate for work' when leggings are in fact appropriate for work in any situation where the employer is OK with it).
Yesterday in my office my boss (male, 50s) was wearing jeans, a plain t-shirt and Doc Martens, I (female, 40s) was wearing a loose fitting jumpsuit and trainers, one of the press officers (male, 20s) was wearing trousers and a formal shirt, the other(male, 50s) was wearing chinos and a casual short sleeve shirt, one of the analysts (female, 30s) was wearing jeans, walking boots and a vest top, and the project managers (one male, one female, both 20s) were wearing oversized jeans, a baggy designer t-shirt a gold chain and insanely expensive limited edition trainers, and a floral midi with a blazer and chunky flats respectively. Another colleague (female, 30s) came in after lunch from an external meeting and she was wearing a shift dress and heels. Our CEO (male, 50s) came in wearing a suit but immediately discarded his jacket and tie, unbuttoned the first three buttons of his shirt and rolled his sleeves up. His PA (female, 40s) was in a black maxi skirt, a black vest top with a black chiffony tunic thing layered over and black boots because she's a goth. Nobody was confused. Nobody cared. Everyone did their job.