You are question begging.  You assume what you want to prove, namely that the SCOTUS ruled on the constitutionality of existing law.  

The decision was 5-4.  The decision was not even close to unanimous.  Four justices dissented.  One made many of the same arguments I made by his question "When did this become unconstitutional?"  A question the lawyer could not answer.  

The only answer he could have given was "Sometime after 2008---when gay marriage stated to catch on and be the next trendy sensation to grip pop-culture." I think Roberts even argued something along those lines, namely that this institution is so new, the court should not be wading into the debate at this time.   

In the end, four justices believed that the decision was wrong, perhaps for different reasons.  The point is that the decision is not so obviously based on existing law as you want to lead me to believe.