Why do journalists keep sources anonymous?
So, anonymity can be granted for a number of reasons. The main one is a risk of retaliation against the person, against their job, against their personal safety. For instance, if you report in a war zone or on a crime victim. It can also be to protect vulnerable people such as children, or if it's just the only way to get the information out.