The institution of "marriage" as recognized by the State (regardless of which State you are talking about) and the institution of marriage as recognized by the Church (regardless of which church you are talking about) are not the same, and never have been (except where there is a Church-State, such as in Islamic countries).
There have always been Catholics who are married in the eyes of the State, but living in sin in the eyes of the Church; divorced in the eyes of the State, yet still married in the eyes of the Church, and so on.
The reasons why a State would recognize non-traditional "marriages" are many and various. They could include taxation, inheritance, health insurance considerations, real estate titles, and so on. But in these times, the States are recognizing gay "marriages" mostly due to political pressure, and without giving it sufficient thought. Because the same considerations that impel recognizing gay marriages could be understood to impel recognizing polygamy, incest (between or among adults), or even inter-species "marriage." "I love my Horse," and all that.
Religious officials should disclaim any authorizations they hold from civil authorities to officiate over legal marriages. This would force couples to consider, and ascertain for themselves, whether they want to be married by the state, by the church, by both, or by neither. It is a significant decision and should be made overtly, and not by default.
If legal gay marriage makes people happy, then why not?