In various cases where you evoke the mental notion of a "channel" or "connection" that potentially makes something available, then the choice of preposition is "to":
It is [open/closed/available/perceptible] to visitors/humans.
In such cases (including yours), "for" is often possible, but it instead evokes the notion of "from the point of view of" or "for the benefit of". So both alternatives are grammatical, but evoke subtly different ideas. In this specific case, the likely idea that needs to be expressed is that of "simple availability", and probably for that reason, speakers would tend to opt for "to" in this case.
The choice of the second phrase probably comes down to a couple of factors:
- the use of the infinitive often suggests that the implied subject of the infinitive is the same as a previously expressed subject, whereas in this case, it would not be the public that was doing the cleaning (this isn't a hard and fast rule: it's perfectly possible to have the implied subject of an infinitive be different to one previously expressed, but this tends to happen where there is a very clear or "default" subject intended);
- the use of 'to' with the infinitive strongly suggests the initiation of an action; there is therefore a conflict if on the one hand you are expressing the non-availability but at the same time evoking the initiation of an activity involving the thing that is not available;
- there's nothing overt to make the word "cleaning and repair[ing]" sound overtly 'verb-like' rather than 'noun-like': no subject/object, no adverb.
Contrast your sentence with the following, where if you apply the factors above, the balance swings in favour of a verb:
"The library is open to the public to use at their leisure"