We still have the same infection control protocols to prevent spreading an illness from an infectious patient to other patients that we've had since before the pandemic. That includes wearing a mask (and usually gown, gloves, face shield) when in a room with an infectious patient. We're just not wearing masks in the hallways and break rooms anymore, and it's caused some outbreaks among staff.
One significant contributing factor to this is the ridiculous American expectation that people should work unless they can't stand up anymore, and if you take a day off, it comes out of your vacation time or it's possible that it could be unpaid. We incentivize people to ignore mild symptoms of illness that result in them arriving to work in the early infectious stages of illnesses. We need to change that, to encourage people to stay home even if they mostly feel well, but suspect they're coming down with something without it eating into their already scarce PTO.
You are correct, and we actually also use them on people who are not actively dead, but are having a bad heart rhythm that is causing intolerable symptoms.
The shocking dead people to resuscitate them thing, the part that everyone is familiar with, is when the ventricles of someone's heart have started quivering in a chaotic rhythm called ventricular fibrillation or vfib. If someone is experiencing vfib, they're actually dead because vfib invariably degrades into full stop flatline very quickly. Shocking someone in vfib briefly stops their heart in hopes that it will reboot itself into a rhythm that is compatible with life.
But the right atrium can also fall into fibrillation. You've heard about this on TV (if you're in the US); we call that afib. Afib is compatible with life, because the ventricles are the main part of the pump and can continue to beat even if the right atrium goes a little haywire. But often that beating isn't very effective and people will experience low blood pressure and shortness of breath. And the right atrium isn't clearing blood out of itself effectively in afib, which can cause the blood to clot in the heart and lead to a stroke if a piece of clot breaks off.
So, you may be thinking to yourself, wait, ventricular fibrillation we use a defibrillator, so what about atrial fibrillation, and that is correct, we can use a defibrillator to shock someone in afib, reboot their heart, and hope they go back into a normal, more effective rhythm. (We do mildly sedate people before doing that lol.) Sometimes that works, sometimes we have to just control afib with meds and we have to keep them on blood thinners to prevent a clot in the heart.
And lastly, there's a more complicated heart rhythm called Supraventricular Tachycardia or SVT that sometimes also responds to being shocked. We try a couple of other treatments first for SVT, but shocking can work. And again, people are mildly sedated for that.