Yes, they decided that portion based on their Constitutional mandate...
... where they went wrong was to expand that to gay marriages...
... which is extra-judicial and falls outside the parameters of their jurisdiction.
Had they kicked it back to Congress to give Congress a legislative reason for doing what they did, then the Supreme Court would have performed their Constitutionall given function...
... but instead, they went beyond their boundary and imposed their will...
... rather than the will of Congress.
The protected status of gender vs. sexual orientation may be splitting hairs...
... but that is Congress's function to do the haircut - not the Supreme Court.
Congress has no authority to tell States how they can regulate marriage.
The Supreme Court however has the authority to interpret the Constitution and determine whether a Federal law(DOMA) or State law is unconstitutional.
