I have to say that it would be better if you asked first and respected the "owner's" answer. It is their connection and while it is "neighborly" to share, it is entirely their right to say "no." If you ask them first, you are being honest and up-front with what you are doing. Most people will probably say "sure" in that case.

I do not care to share my WiFi connection with anyone I do not know, which is why I use a password. The law is not clear on things like what if the "borrower" does something illegal--the owner of the connection might get into the soup.

When you do not ask first, you give the appearance that what you are doing is wrong or at the very least sneaky.