I disagree, even people's home networks that I've seen are usually locked these days...No, all wifi's aren't locked. I would say that a LOT of them aren't. LOL!
Most cafes and restaurants that offer Wi-Fi lock their networks and require you to make a purchase to get the code. Either that or they hand out free codes with time limits on them, that way leechers don't soak up bandwidth and take tables that would otherwise accommodate paying customers.