This seemed to be a mistake that was made in a lot of different countries. I think it was really a bit of a miscalculation.
But also, there became a kind of, not over-emphasis, the media seemed to stoke, in the general public, an unrealistic sense of how viruses of all kinds go through care homes for the elderly. It's actually really common for a flu or other respiratory illness to go through places like that and take a real toll - but it's important to note that "flu" etc aren't listed as the cause of death in most cases. It's often listed as heart failure.
A lot of people aren't very realistic in understanding that when an elderly person goes into care, they are likely to die within the next two years, even less than that in some kinds of care. Their health is frail, only going downhill, and a virus will be the factor that pushes some over the edge. Just as an example, one study looking at yearly mortality rates in nursing homes put them at 33%. So that is an average of 33% of the people in the home every year.
Now, with things like a virulent flu, sometimes care homes will quarantine to some extent. But there have always been realistic limits on that. You can't shut people in, away from family and the outside world, for more than a short time. And you also cannot keep a virus like that out. It will get in, and it will get in every year, and that's just how it is.
There is an argument that it was sensible to have these homes locked down until the vaccine, but not a watertight one. Yes, people died in that year, but ended up dying, not only from covid but from all the normal things that kill people in care homes, in horrible conditions without loved ones, or spending their last days in an institution instead of being allowed to go out and do normal things, enjoy the outdoors, and so on. Just as an example, one study looking at yearly mortality rates in a nursing home put them at 33%.