That isn't exactly the case, Rodney, although better safe than sorry, right?!
The reason real estate agents shouldn't comment on crime is because we're not crime experts or law enforcement experts - we are liable, not only for the accuracy of the information we provide, but for the impression we leave on the client. The General Public expects us to be experts and when we comment on a topic, such as the condition of the roof or the safety of a neighborhood or the quality of the schools, we take on the position of an expert.
For us to tell someone that a neighborhood is "safe" is stupid, for us to tell them that it is "dangerous" is an invitation to spending several weeks talking to a Federal employee.
It is not in any way against the law, or an ethical violation, to comment on crime in a neighborhood. It's only stupid.