Just wanted to expand on this a bit.
We were told to try and find parallels in the story and I think McNulty's situation can be paralleled by the witness who was murdered. The witness testifies in court and he gets shot for it. Obviously, there's much resentment against cops in the poorer communities which is manifested in the "no snitchin" attitude.
In the projects, justice is not believed to be given by the government but by the people in them. Dee knows this but is disturbed by the resulting violence. His youth shows in this and his mentors try to teach him their ways. "Giving a fuck when it ain't your turn to give a fuck" in that setting is more of a way of protecting yourself and keeping your nose out of someone elses business than just doing more than what is expected of you.