They probably get paid well for working lots of overtime, I don’t think the base salaries are that high. But a lot of them do bring home a good amount of dough. It is probably hard to vote to cut pay for firefighters or cops if you are on the city council so that might be how they’ve gotten so well paid. And they have unions to help organize and petition for more benefits and pay so that helps them too. Of course it is always politically popular to give police and firefighters raises.
Do you want to know who really keeps you safe? It’s the people keeping your fresh water coming into your house and the waste water leaving it. Also the sanitation department for picking up the trash, and the truckers and grocery workers that make sure you have food to eat. Most of us would survive with no police or firefighters but without any of that other unglamorous stuff we’d all be dying of starvation or cholera.