That law brought the case to trhe Court, and provided it with a reason to act.
Quit sticking your head in the sand and think clearly.
They brought the case to court with several arguments (4 ways of arguing the case).
"Discrimination" was but one. Do you believe that the men would not have gone to court if the law had said "all couples"?