There's another reason that hasn't been mentioned yet why it might be argued that her presence there was acceptable.
She held the rank of Lt. Cmdr., with only Picard, Riker, and Crusher having a higher rank. Later, when she passed the exam, she became a full Commander, so she would likely have higher clearance for things. And since she was full Commander at that point, it was definitely acceptable to have her there.
I wonder if part of the reason why the writers did that was because they felt her presence needed justification... probably heard it many times over the first 6 years.