It may be useful to expand this discussion a touch beyond the classified/non-classified area out into "censorship". A lot of disciplines have forms of self-censorship built into them, usually in their so-called "codes of ethical conduct" but, also, in their traditions. Let me give you an example...

When I was doing my Doctoral fieldwork, I was informed by my ethics committee that I must change the names of all the companies I was working with. At the same time, as part of negotiating the informed consent forms, I was told by the companies that I must use heir real names in my work. This caused a few people on my ethics committee to have heart palpitations. You see, the rule/tradition about changing the company name is based on the perception that the researcher is in the position of greater "power" since they get to write up the results. The attitudes of the companies laughed at this pretension. As one of my informants noted "If you [i.e. me] screw up, we'll ship your a$$ out of here, so who really has the power?".

The entire anonymity / hidden identity thing in a lot of social science research is based on the assumption of a power inbalance. But what if there isn't one for a particular study?