The government funds some libraries, and for some publicly acceptable reason. That reason should apply to web infrastructure, and indeed the small web. Other libraries are community run. Again whatever motivates that probably applies to small web stuff.