Of course, trespass laws don't apply directly, but I think that's an excellent analogy and could be an appropriate basis for future laws about web use.
As far as I know, the laws against trespass in the physical world derive from common law. It's a shame we don't have a similar common-sense starting point for computing law; but computing is so new (and to many people so esoteric) that few of us have had a chance to develop something like "common sense" about it.
The result is that the correct analogy for a situation isn't always obvious. For instance, we could go with the ever popular car analogy: Corporate players want their (public facing) servers to be treated under law not as stores open for business but as cars on a dealer's lot that you're welcome to test drive with permission but that it's illegal to just grab and take for a joyride.