香港出世先有護照 - Anyone who was born in Hong Kong before 1983 would automatically became a Citizen of the United Kingdom and Colonies (CUKC) and then British Dependent Territories Citizen (BDTC) in 1983.
Those who were born in Hong Kong on or after 1983 would only become a BDTC if at lease one of his parent had Hong Kong Permanent Residence status at the time of his birth.
As China never recognised the so call 'unequal' treaties with the UK, she does not have a consulate in Hong Kong.
This meant that those who came to Hong Kong from China were unable to apply for a Chinese passport in Hong Kong.
They cannot get a Chinese passport in China either as their Chinese household registrations were cancelled once they moved to Hong Kong. You cannot get a Chinese passport without Chinese household registration.
Therefore the pre 1997 Hong Kong government used the Certificate of Identity to fill this gap. The Certificate of Identity was issued to those who had Hong Kong permanent residence status but no way of getting a national passport.