I'm somewhat flabbergasted that only one person so far in this thread has landed even remotely close to grasping the purpose of marriage. The institution of marriage follows naturally from a few simple, basic facts about human nature and biology:
1. Human beings are altricial [http://en.wikipedia.org/wiki/Altricial]. That is, the young cannot care for themselves, and require someone else to raise them.
2. Human beings are naturally selfish and will often act in their own short-sighted self interest. Humans must be taught certain virtues, like prudence and temperance, so that they act with a longer-term view, forgoing immediate pleasures in order to obtain a long-term good, or enduring temporary suffering in order to avoid greater suffering down the road. Think of dieting in order to achieve good health, or pinching pennies in order to save for retirement. These are difficult behaviors to learn and must be taught in order to most effectively pass them on from one generation to the next.
3. Moreover, a society where everyone acts according to the cardinal virtues of prudence, justice, temperance, and fortitude will be more successful, more productive, and longer lasting than a society where everyone acts in their foolish short-term interests. I think the recent economic crisis in the US is a good example of short-term interest being to the detriment of society, i.e., where bankers make loans to people who can't repay them, and people take loans they can't repay, because there's an immediate payoff (profit/home-ownership), and they don't think about the long-term consequences (or think they can get away with it).
4. Every shred of sociological data we have, not to mention the wisdom of our ancestors, tells us that children are better cared for by their biological parents, and that children will learn best to be loving from parents who themselves love each other.
5. Children are a product of sexual intercourse, and until very, very recently, it was the only way to produce them. In fact, the entire reason human beings have a sex drive, biologically speaking, is for the procreation of the species.
Now, putting these facts together tells us that: a society where children are raised by their biological parents will be more likely to produce people that are better able to function for the benefit of the society. A society that brings children into the world, but does not educate them, love them, or teach them the cardinal virtues will not be as successful. From an evolutionary-sociology point-of-view, this trait of having children cared for by their biological parents is an evolutionarily selected-for trait.
I will add another fact here, which is sort of an aside, but does contribute to the argument:
6. Human beings, and men in particular, are not naturally disposed to stay in monogamous relationships and rear their own children. In fact, the optimum strategy for men to reproduce is to sleep with as many women as possible (someone else mentioned this farther up in the thread). However, this will result in children less likely to grow into mature, responsible adults.
For these reasons, all societies from the dawn of time have created a social institution, existing apart from religion (but sanctified by it, in all societies that practice religion, that is, all societies) to ensure that children are raised by their parents into virtuous adults, capable of carrying on the society into the next generation.
In short, marriage is the context in which a society permits sexual intercourse in order to ensure that children are properly cared for and brought up. Sexual intercourse taking place outside the bonds of marriage is more likely to produce children born not to two loving parents, and therefore children less adept at growing into mature adults, and therefore less able to further promulgate the society. This is why there is such a thing as marriage.
It is a public institution because childrearing is a public concern. Societies have a vested interest in assuring that the next generation can care for the previous in their old age, and natural selection favors those societies who try to carry their values and institutions into the next generation.
Marriage does not exist for the following reasons:
-To provide tax breaks, inheritance, shared health care benefits, or any other type of economic incentive to the two or three, or four, or more) persons (or sheep or inanimate objects). In fact, it goes the other way around: public benefits are given to married persons as incentive, because it's in the public's interest that the couple remain together through their child-rearing years.
-Because I'm in love and want to tell the whole world. One does not need any sort of formal, public, or governmental recognition of your relationship in this case. Go ahead and declare your love, eternally, until death, or for the next 7-10 years. No one cares.
-To increase the wealth, land, power, or kingdom of one's family.
-To subserviate women to men, and remind them who's boss. Rather the opposite, marriage exists to rein in the man, and get him to support his offspring and their mother. Anecdotally, note that it's often the man who resists marriage, even in these days of feminism.
-Because Jesus said so.
So, to the OP, if you see a wedding as just a big party to show off to your friends, and fulfill some egotistical needs, then you are absolutely right to oppose it as a sham. I'm right their with you. But as to the reason to get married? Why do it? How about: out of duty to one's children, lover, family, and society? Marriage is a responsibility, not a right.