The majority of people deciding to have libraries is just as democratically legitimate as the majority deciding not the have libraries.
but in the case of firefighting, most cities could drastically reshape their emergency services to put much of what firefighters do in the hands of an emergency response office that is much cheaper to run. its no coincidence that firefighters make sure they are in the critical path of vehicle accident response etc...they realize that structure fires are vanishingly rare and they might otherwise see drastic cuts. there isn't any real reason why a fire truck should be responding to someone with mild whiplash in a rear-ended vehicle (and no, the reason isn't because the vehicle might spontaneously combust).