Before the “pooper scooper” regulation was passed in the 1980s, cleaning up after your dog was merely voluntary, and the Department of Sanitation could merely encourage people to do so.
The DSNY went through several sign designs in that effort. This one from the 1960s is still in place.