If the bride and grrom lived in different parishes, the banns had to be called in both parishes. What the registers generally record is the fact that the banns were proclaimed, though in many cases the date of the marriage is also recorded.
In this case there are two records of proclamation of banns, and the name of the officiating minister is given, therefore it is not a case of an irregular marriage.
As Ruth says, I can only think that as they were married in Edinburgh, and wanted their child baptised in Prestonpans, they were required to produce evidence that they had actually been properly married, and that they had been married long enough for the first child not to have been conceived before the marriage.