They probably don't even stop to think about what security measures can be taken to prevent being pwned.
Let's not throw out the baby with the bath water here, it's pretty helpful to have legal deterrents to amoral actions...
Not at all. Short of building a fortress, you won't stop someone determined to get inside, but you can make it sufficiently difficult that they're more likely to be noticed, or more likely to seek out an easier alternative.
> it's pretty helpful to have legal deterrents to amoral actions...
Nobody is suggesting otherwise; rather, the issue is that legislating against something doesn't stop it from happening, and therefore you do still need to secure against it as part of your threat model.
Furthermore, laws tend to paint with a very broad brush; changing a number in a URL isn't "hacking", for instance. Laws should work with technical measures. Climbing a fence makes it much more obvious that you're trespassing.
Legislation meaning you don't need to defend against it is actually quite real in meat space (and quite effective), so pretending like it's universally a bad idea is incongruous with your own facts.