Local libraries are pretty cheap. Programs to give books to poor children may not be as cost effective. Giving computers to poor children may simply result in them being sold, either by the kids or their parents.
Commercial libraries (proprietary libraries) have existed. They typically catered to the kind of people who paid a lot for membership - upper middle class professionals. If we relied on commercial public libraries today, they would be stacked with O'Reilly's books, Tolkien, popular economics, management books, and the like.