Why? Libraries are more beneficial for the community in general and the more they get used (and the more you spend in the cafe there) the more likely they are to stay open.
They are also often much better and more comfortable spaces for working than cafes.