Here's another question: How long would a reporter, especially an embedded reporter, keep any sources in a command if he/she were to violate a non-attribution agreement?
They'd be hung out to dry and the home office would have to bring them home. Not good job security or something they'd want on their resume.
If the source insists on anonymity, then it should automatically be suspected that the source is speaking inappropriately and should not be interviewed in the first place. He or she is speaking when he or she is not cleared to. In a command structure, that's a punishable offense.
A reporter with any semblance of integrity would not cite a person who would be willing to violate the law (or the UCMJ) in order to give that reporter the dirt on a case. That's not fair to the accused, it's not fair to the service, and it's not fair to the public.