The 14th Amendment mandates that the states afford each citizen equal protection of the law, and equal access to all state laws accordingly. One does not forfeit his civil liberties as a consequence of his state of residence; and a ‘state can not deem a class of persons a stranger to its laws,’ including marriage law.
The states are free to manage marriage as each sees fit, determining who may or may not marry, provided the criteria for marriage is applied to each citizen equally; because there is no justification, rational basis, or evidence in support of prohibiting same-sex couples from marrying, and because such laws are motivated by animus alone toward same-sex couples, the courts have held these statutes un-Constitutional.
In the case of DOMA, rather than a law being applied inappropriately to a class of persons, here the states are subject to an inconsistent Federal policy, where Congress has singled-out a particular aspect of a state’s marriage law, and subjected it to capricious and unfounded regulation.