For benefits and stuff like that. Some states wanted to recognize gay marriage and some didn't (l.e. not all marriages received the same benefits). The reason it went as high as it did is because some see it as a human rights issue backed by the constitution.
I personally didn't see it that way and I think it should've been left up to the states. I support gay marriage and eventually every state was going to allow it anyway. I am a huge believer in states rights though, and I think this decision is another slippery slope that erodes the rights of individual states. Liberal judges are much more inclined to take away the idea of individual state rights.