When we reverse and negate, we create a proper contrapositive. This is perfectly valid, and it carries the exact same logic as the original statement.
Our general principle says: "If the law punished littering, then the city has an obligation to provide trash cans."
PL - - - - - - - -> OPTC
If we reverse and negate:
not OPTC - - - - - - - -> not PL
This is valid reasoning. However, this is not what the author does in question 8. The author tries to conclude:
not PL - - - - - - - > not OPTC
This simply negates all conditions, without flipping them, which is not valid. To put it into words, the failure of the sufficient condition does not guarantee the failure of the necessary condition. The author's flaw is believing that it does.
It only works the other way around. The failure of the necessary condition does guarantee the failure of the sufficient condition. From this, we derive our contrapositive. You will be tested on this constantly on the LSAT, so practice with you diagrams until you are very comfortable with this conditional reasoning.