You don't eat in the library. You'd get the books messy.
The library here is intended to evoke a university library, where scholars toil away their lives searching for some snippet of information. Libraries have bathrooms, and places for catnaps, but not real sleeping facilities, and certainly not places to eat. You go home for that.
The question is, why did Borges include that surreal little detail if you're not intended to ask about the other pragmatics of life in the Library? Or rather than engaging in crit-fic, what is the effect on the story of that line?
I'd suggest that it helps set the tone of the piece. This line is in the opening paragraph, and establishes a certain absurdity right from the get-go. Sleeping standing up does not make this a very inviting place. Jumping to the question of bathrooms before you've established the purpose of the place is simultaneously pragmatic and out of place.
It's in keeping with the last line of the paragraph: "The light they emit is insufficient, incessant," a striking contrast. At first they might seem contradictory, but they aren't. That, and the fact that the light comes from "some spherical fruit", creates a mood that is somewhat off-kilter. The reader is being told "This is not a place of the real world" by the ridiculousness of the practical details we do get.
It feels like a university library, where the author spent a lot of time and which would be very familiar to many readers. The "insufficient, incessant" light must be maddening: the lights are on 24x7, but it's nonetheless often too dim to read comfortably. The "spherical fruit which bear the name of lamps" sounds like the kind of thing a bleary-eyed scholar might come up with: the dim lamps feel like his only nourishment.