"the government" aka "We the people". It is in all our interest. This is like asking why the government is responsible for roads.
Thought experiment:
If roads were built by private companies, could a Government justify the expense maintaining a database of all the potholes?
They might take a step back and realize that it would be more cost-effective to just own the roads, in which case your thought experiment ends where we are, because where we are was a place reasoned to(to an extent).