Shortly before the Glorious Revolution of 1688, the hope that the deeply unpopular (and Catholic) James II would die without legitimate heirs was confounded by the birth of James Edward--the future Old Pretender.
Confronting the stark reality of a Catholic dynasty, rumors quickly abounded that the birth was a sham and that the newborn Prince was actually an imposter smuggled in a warming pan that had been used by James's Queen at her lying-in.
William of Orange declared that he was convinced that the rumors were true, and used them to partly excuse his invasion of England to defend the Protestant religion.
As a consequence, future Royal births in Great Britain, up until the mid 20th century, had to be witnessed by a Minister of the Crown...a rather onerous duty!
Apparently, this requirement was a constutional convention only, and there was no statute law involved.
RR