Maybe each commander gets to choose the dress code in their command. On DS9 Sisko is in charge, so he can choose one style; but when he's on Earth he's under Layton's command, so he wears what Layton tells him to wear. Picard was obviously pretty liberal in his uniform policy (see: Troi). The various extras with the old uniforms in DS9 could be people from other ships, etc.
(By the time STO rolls around, it's a free-for-all.)