It was an objective public health measure, because it is well-known from actual examples that opening such option would lead people to try to get infected instead of being vaccinated, breeding even more variants and hospital saturation.
Note also that "previous contamination" has never been an acceptable derogation in any public health system for any of the compulsory vaccinations.