It helps your body fight the virus but you can still technically in incubate it. However, it is likely to reduce transmission, as how much virus you shed increases transmission, as presymptomatic patients have higher viral loads and have more risk of transmissibility. By this logic, people who won’t develop symptoms, like those vaccinated, are likely to not shed as much virus and have reduced transmission. This simply needs to be confirmed through evidence in the scientific community. So far the tldr on “does virus reduce transmission?” is “we don’t know yet, but it’s likely”.
Also more exposure to the virus is likely to make you sick(er), and as a healthcare worker, you are likely to transmit the virus to already weakened patients. It is more recognized that peak transmission occurs before symptoms appears. You can also transmit the virus even if you are asymptomatic (although to a lesser degree than if you are showing symptoms). Plus a sick healthcare workers cannot take care of patients, putting more strain on the healthcare system.
Triage is what is likely to kill people rather than the disease by itself if healthcare systems get overwhelmed, so it’s important to keep the highest capacity as possible in hospitals. A lot more than covid patients will die if that happens. Of course we want to avoid those death as well, but assuming the vaccine does indeed reduce transmission to some degree, and considering vectors of the disease are likely to be workers who feel well, and not crippled/inactive individuals, it’s not a that bad idea to vaccinate them first.
Vaccinating healthcare workers at least helps health infrastructure to keep running smoothly at worse, and at best, it also create a heard immunity shield for patients.
Yes, you could also vaccinate the elderies straight up, but it would take away the potential benefit of creating a heard immunity shield that healthcare workers would provide to the more vulnerable in hospitals and nursery homes, thus helping hospital staying at maximum capacity and avoiding death of the already vulnerable that are there. It’s two birds one stone.