At my local library, I need to type in my library card to get on the 'net. Non-residents of my town can get a card, but they need to pay (unlike residents, who are free).
I see nothing wrong with the Lahaina library charging $10. With many hotels' "free" wi-fi, you usually get an access code when you check in. I guess you can always lie and say I'm in room such and such to get the access code, but in a sense, you are already paying for it.
Many parts of Hawaii are already packed with tourists, I am sure it's nice for the locals to have places where they can "escape" from tourists!