The loyalties of a country's government should absolutely be with its constituents. That loyalty does not necessarily mean that the health of its inhabitants only should be the government's concern.
I can perfectly imagine a healthy 40 years old UK constituent supporting the idea that a 80 years old EU constituent should get priority over him. Or the other way round obviously, should that situation ever occur. Governments could take that into account, but we don't even have to go down that contentious rabbit hole to find points of consensus.
I just happen to think that an opportunity to reach a Pareto optimum was missed in negotiations, particularly between the UK and the EU.
Would an agreement on proportionality in vaccine distribution really have been so difficult between the EU and the UK for example? That would have produced real advantages for both sides.
Both governments can harm each other's vaccine supplies, and it's increasingly looking like that could also become reality. That's lose-lose instead of win-win.