Instead of paying them to twiddle their thumbs, most communities train them as paramedics and either have the fire department run an ambulance service or just use them as first responders who can get to a medical scene before an ambulance can.
Bigger paid departments have a split between engine companies and rescue companies. Rescue companies have fancy tools for all sorts of situations and usually have more trained medical capability. That’s why you’ll see ladder trucks dispatched to medical emergencies in the US.
However, I can only imagine that all developed countries have the “problem“ that modern building codes reduce the rate of fires such that they are faced with the choice between (1) reducing density of firefighters and therefore increasing their average response time (2) paying them to sit around and do nothing, or (3) giving them something else to do when there isn’t a fire.
The entire system is based on counting the minutes from 911 call to treatment in the hospital, and treating it as a process to be optimized.
I think statistically, you need more medics than firemen, so it may make sense to think of the fire station as a paramedic station that's also equipped to fight fires.
My friend, the former EMT, told me that they like to have a crew of 4, for any call. The reason is that a large number of patients are obese, and it might take 4 crew to get someone out of their house. He said: "That's why you always see a fire truck following the ambulance."
It's odd to me to think of the fire service giving first response medical care, outside of perhaps smoke inhalation and burns.