According to this article, food safety and building safety are also covered by the public security budget.
This seems to be a good source for U.S. government spending
According to it, the 2021 total U.S. government budget (Federal + States + Local) are
Police 141.6 billion USD
Fire protection 47.6 billion USD
Prisons 82.8 billion USD
Courts 73.7 billion USD
I'm surprised by the amount the U.S. is spending on fire protection.
Residential buildings in the US are mostly wooden constructs. Higher fire protection budget is justified.
That said let’s get back on topic please.