Some of the careers don't have uniforms or specific outfits and will cause sims to wear random "career" outfits. EA developers also apparently thought it was a great idea to have random outfits for San Myshuno festivals, rain, walking down the street in certain neighborhoods, the magic realm, and being or imitating a vampire at night. Any of these "situations" could be causing the weird outfits on your sims.
It drives me nuts.
I use several mods by Bienchen to get rid of most of those random situation outfits on sims that have good wardrobes. If you can/are willing to use mods here's the link
https://deichschafblog.de/bienchen/outfit-mods-outfit-mods/I think that MCCC also has settings for banning situation outfits. But I'm not sure. Others might be able to help you with that if you are interested.
Without mods, unfortunately, there's not much you can do about it. I don't know why the devs thought this "feature" was a good idea, but it is apparently by design.