Quite honestly, I didn't enjoy spending time at my local library. The atmosphere was depressing. The people running the place seemed unfriendly. They were used to dealing with people coming in and trying to hide in the bathroom during closing in order to stay the night, and things like that.
There was no good place nearby to get food or drinks. Internet access was slower, more inconvenient and more restrictive than most coffee shops. There didn't seem to be a community of people hanging out working on or talking about interesting things.
If libraries created an inviting place to hang out, I would gladly give them another try. I'm more than willing to buy food and drinks at a markup if they're offered. I consider that a good trade: I get sustenance to keep me concentrating for extended periods of time, and they get some compensation for use of the space and resources.