Troi needed to look less informal in her role of counselor.
I would feel a lot more comfortable if my counselor wore a uniform like my own...not a bunny suit with boobs-a-poppin' and a camel toe.
That's your story, buster! Me, I wouldn't mind having a hard-on the whole time I was being counseled! Of course, being an empath, it wouldn't be a good experience for the lovely Deanna Troi, or as my good friend used to call her, Counselor Cleavage!

My fave Troi look was the Season One grey jumpsuit with her hair up in a bun! Yummy!
Back on topic, I prefer
Trekker4747's explanation. Troi and Worf earned the right to skirt the dress code, Ro at that point hadn't. And Riker was being a hard-ass with a junior officer with a bad record. He has a history of doing that as first officer.
For example, in
Lower Decks, he gave Sam Lavelle a hard time for saying, "Aye, aye, sir," then sniping, "One aye is sufficient, Ensign." Hell, he gave Geordi a hard time for being too familiar with him in
Encounter at Farpoint. He said to Geordi, "Is this an official report, Lieutenant," and Geordi adjusted his posture, standing ramrod straight, then gave his report.
Red Ranger