Unlike the airport, there is no individual processing of passports in the cruise terminals. They just sight your passport and collect your arrivals card. Border Force process the ships passenger manifest prior to clearing the ship for disembark.
That then allows, depending on the ship, to usher infected passengers through the back door. Borderforce, quarantine, terminal staff and other passengers do not want to interact with the "plague", so it is all kept separate. Once out of the terminal, they are free to roam freely again.