Since Annie was surname Mc Adam on her birth record it is assumed she took on Kerr after her mother married John Kerr.
That is not a safe assumption.
Even if the whole parish knew who the father of an illegitimate bairn was, the father's name could only be on the birth certificate if he accompanied the mother to the registrar's when she went to register the birth, and signed the certificate. And it's very common for an illegitimate child to use its father's name, or even to turn up with different surnames in different censuses.
Look carefully at the marriage certificate. How,
exactly, is Annie's mother's name shown?
If it just says 'Jane McAdam', this means that Jane had not married by the time of Annie's marriage. If it says 'Jane Kerr, M S McAdam", this means that Jane McAdam (claimed that she) had married John Kerr.
have a look in the transcription of the 1861 census at
https://freecen1.freecen.org.uk/cgi/search.pl - I think Annie is probably the Ann Kerr, aged 2, a boarder in the household of John Hamilton at Clendrie Cottage, Kirkcolm in 1861. In 1871 she is a 12-year-old outworker, still with the Hamilton family at Clendrie. In 1881 she is a domestic servant in the household of Thomas Blair Hutchison in the parish of Colmonell.
The fact that Annie was boarded out as a child supports the view that her parents did not marry, because if they had, surely they would have taken her to live with them?
There are three possible ways you might find out more about Annie's parents.
First, it is possible that Annie came under the care of the parochial board, who arranged to board her with the Hamilton family. If so, there would have been detailed records of her in the registers of the Kirkcolm parochial board (Poor Law records). I have no idea whether these have survived, but I would start at
http://www.dumgal.gov.uk/article/15308/Local-archivesNext, as the pregnancy was illegitimate, it would almost certainly have come to the attention of the Kirk Session of Kirkcolm, and if so their minutes would probably contain information about the errant couple. The surviving Kirk Session records are in the National Records of Scotland, and there does seem to be a volume dealing with 1835-1884 and an overlapping one for 1862-1871 (sometimes it took the kirk session a year or more to catch up with a couple who had sinned). Look in the NRS catalogue
https://catalogue.nrscotland.gov.uk/nrsonlinecatalogue/search.aspx and use reference starting CH2/788. These have been digitised but as yet can be consulted only in the Historic Search Room in Edinburgh or in a small number of local archives including Aberdeen, Glasgow, Hawick and Inverness.
Thirdly, there might have been a court case to get a paternity order to make the father pay for the maintenance of the child. Many of these have been indexed and the indexes can be consulted at
https://www.scottishindexes.com