It is in Illinois. Their Computer Tampering law specifically makes violation of a web sites ToS punishable by up to 5 years in prison. Probably other states have similar.
Typically for copyright infringement. They'll sue you for the maximum legal damages possible per copy, multiplied by the number of times your bot loaded a page, probably in the trillions of dollars.
I'm happy to write code to let users circumvent the restrictions put in place by assholes, as long as it doesn't end up getting them in legal trouble I'm fine with it. If companies like google don't want people to try and screw them over, I suggest they offer an olive branch and stop being unethical jerks.
Coprporations (or other organiztions or individuals) can make things available to the public without completely ceding control over how they are used.
Imagine a landowner who allows public access to hikers using defined trails but no overnight camping. That's legal and just has to be posted. If you don't like it, don't use it.