Before is typically used as a conjunction to contrast an earlier event with an event that followed.
He had taken a sip before he realised that it wasn't water.
She had dressed herself before she heard a knock at the door.
In your example had been training emphasises the extent of the training. It would be possible to say that she had trained but that might be on a single occasion, which is not the same thing. You could also say simply that she trained but that presents the same problem. So while these options are grammatical, they lose the emphasis on extended training - the sense of having trained at length.
In short, the example, as given, is the ideal way of constructing the sentence in that context but not the only way.
Why was Ann crying before? is unusual and somewhat puzzling. We would normally expect earlier or beforehand or before that unless the question followed a statement such as:
Ann has just come back from a meeting with the lawyer
Why was Ann crying before?
It's another way of saying beforehand or earlier but it's not idiomatic.
https://www.macmillandictionary.com/dictionary/british/before