I agree with the two answers above.
I would add that I feel that what the laws say, does not directly/necessarily determine what is good or bad, nor what someone should or should not do, except from the context of the law. In some cases, from some subjectively well-reasoned perspectives (and even in some cases, some objective ones), doing some things that are against the law may be good and/or something someone should do.
Laws are passed by elected legislators – you know, those people most people are disgusted with? More and more often, they are written by the corporations that pull the legislators’ strings. Such as, laws that say it’s illegal to publicize information about negative aspects of what some corporations are doing.
What the laws should say is often fairly subjective.
What my subjective opinion says about graffiti laws, is that if someone paints/draws etc on someone else’s property without permission, then that gives the property owner a legitimate right to complain, if they choose to, and seek compensation. And having a law where the police can detain such a person to allow that to happen, seems reasonable in proportion to the scale of the effort needed to undo the drawing, and/or to tell them to stop and ask permission.