In large parts of the world we live in , what history taught men has not been forgotten by their genes. If you were from a remote rural middle class Indian family, the mindset hasn't changed or has changed little. You will hear a woman being married off to a man and not a man and a woman getting married.
While prostitutes had personal freedom, married women were sold to husbands as little more than breeding fodder. Their lineage was important, but they were not. Wives were property.
Even in recent history, men have dominated the women they were married to by rights. The rule of thumb isn't a very old law. Barring Pimps, women who were prostitutes still tended to have a much higher amount of personal freedom, even if they were looked down upon. Only religion has had any effects on the freedom of unmarried women.
In the last fifty years, what we have seen has not been married women being less like prostitutes, but more like them. Married women having more freedom in their lives to make choices about what they want to do. If Marriage is becoming a form of condoned (prostitution isn't illegal everyone, so I won't use the term legal) prostitution, them maybe that's a compliment. However, historically, no, marriage was not anything like prostitution.
There are certainly going to be exceptions to what marriage is and is not. The large age differences do tend to have a higher percentage of unhealthy dynamics. The older often trying to recapture youth, and resentful when they cannot. The younger may be seeking a form of fulfillment that a relationship cannot offer.
The dynamics of marriage are often very different by location. Marriage is a very religious institution, and so what defines a marriage is often heavily influenced by the local religion.
Certainly marriage offers and individual gain. That does not mean the gain is monetary. It is far more community minded, where the couples are pooling their resources, rather than one giving and the other taking. The gain can be spiritual offering emotional fulfillment. The gain can be security and comfort. Family alliances are not unheard of, so the gain can be for more than just the two people directly involved. Very rarely will that gain be solely or even largely about money.
If a prostitute is one who seeks personal gain in return for something of themselves, then everyone alive is a prostitute. I give my time at a job in return for money. A child goes to school and studies in return for grades and possibly a future. So on and so forth.
If prostitution is selling sex for money, then no, marriage has nothing to do with prostitution. Sex is a part of marriage, but sex is not marriage.
To answer, why couples make love on their first night together: Can you think of a better way for two people to celebrate? Besides, what was a somewhat dubious practice has now become a tradition. It’s the same reason why so many Atheists still give and receive presents on holidays. You may not agree with the roots of the reason, but it's still fun to do.