From Canon Law on Marriage by Adolfo N. Dacanáy:
A third problem [with the law Tametsi of the council of Trent enacted in 1563] arose from the fact that the “assistance” of the priest was merely passive, for which reason the so called “surprise marriage” became a problem. [Continued in footnote:] The contracting parties, with a party of their friends would literally break into the priest’s residence, rouse him from his sleep, and express their consent to marriage even before the poor pastor realized what transpired. Partly for which reason, the present code prescribes that “only that person who, being present, asks the contracting parties to manifest their consent and in the name of the Church receives it, is understood to assist at a marriage. [C.1108.2] It is also for this reason that the marriage rite should include the minister actively asking for the consent of the contracting parties rather than their merely expressing their consent spontaneously and unasked.