Public wedding ceremonies (as a canonical form required by Church) are the result of confusion that arose from reasons for secret marriage. These reasons inclued (according to various historical and regional customs and traditions) even promises of marriage between the contractors themselves only, or voluntary intimate intercourse with implicit promise of marriage.
Until the Council of Trent public wedding ceremonies were not a condition for the validity of marriage in the West.