I don't think Troi's purplish-grey pantsuit in Encounter at Farpoint is a uniform, because no-one else is wearing anything similar. I'd suggest it as the TNG-era equivalent of civilian business wear. So, why is she not in uniform (except when she is)?
The characters of Troi and Riker were derived from the characters of Ilia and Will Decker of Star Trek: The Motion Picture. Ilia and Decker were considered as characters to appear in the Star Trek: Phase II series which as we all know, didn't happen, and might have been problematic because of their manner of departure at the end of TMP. All this is to point out that Troi stands apart from the rest of the crew is some respects.
Anyway... apart from the initial writing difficulties for Troi's character, consider that she is more like a civilian attached to the ship for her professional specialty (counsellor) than a full operational crew member... note that she is addressed as "Counsellor", not by some service rank e.g. Lieutenant. Crusher has a service rank but is addressed as Doctor because it's anin recognition of the advanced qualification;medical qualification over and above her Starfleet commission; "counsellor" isn't really on the same level, so it's not supercedingit wouldn't be recognized over a commissioned rank, it's all (if she has for a titlehad one). So... Troi doesn't turn out in uniform (initially) because she is not really commissioned Starfleet. She turns out in uniform later because she seems to have acquired a commission (she goes up for command qualification at one point), and the variations in her duty attire seem (in-universe) to have more to do with mood than protocol.