It's true that some dogs just "let go" unexpectedly.
I wish I could give you a good reason, or a way to tell in advance that they will do it
, but it just happens. Unless the discharge was bloody, or she seems in discomfort or pain, I wouldn't worry about it either.
Some dogs will do that, especially when they are relaxed. And, unfortunately, there isn't much that can be done about it short of removing the glands surgically, which isn't without it's risks and complications.
Some have advocated adding more fiber to a dog's diet to ensure a hard BM, thereby expressing the anal glands during the BM, but I cannot say that I have had success with it. It tends to be a more individual response with that anyway.