its mostly illegal because gangs in gang areas use it to mark territory that and some people are all lyk "JOOZ PAINTIN MAI PROPTAY!!!!!!" which is kinda understandable but yeah i agree it doesn't look good tho usually
I personally don't like graffiti for the simple fact that its defacing public and private property. But at the same time it is very creative artwork that could be put toward better use.