There was a long line of advocates claiming responsibility for same-sex marriage’s victory at the Supreme Court on Friday, but a key driver was the support two years ago from 278 mostly multi-national tech companies that included Apple, Facebook, Google, Microsoft, Amazon, Cisco, eBay, Electronic Arts, Intel, Intuit, Oracle, Twitter and Zynga.

These companies  filed a 2013 brief at the Supreme Court in support of overturning the Defense of Marriage Act. By 2015, the list had grown to 379 corporations.

The tech community’s argument for rallying to same-sex marriage was that it would be an affirmative statement in support of fairness. They claimed that the same-sex recognition by most, but not all states “needlessly burdens those companies with extra costs and bureaucratic tangles.” They complained that the Defense of Marriage Act (DOMA) put the companies in the uncomfortable position of being forced “to treat one class of our lawfully married employees differently than another, when our success depends upon the welfare and morale of all employees.”

With Tim Cook of Apple Inc., as the first openly gay CEO on the Fortune 500 leading Silicon Valley’s effort, major corporations like Citigroup, Johnson & Johnson, Goldman Sachs, Nike, CBS Corp., Starbucks, and Disney also signed up to support same-sex marriage. Morale and money aren’t the only issues, however. The companies say that DOMA also forces them to betray their principles. “DOMA conscripts (companies) to become the face of its mandate that two separate castes of married persons be identified and separately treated,” the brief complains, even in states, counties, and cities that ban workplace discrimination based on sexual orientation and marital status.

The petitioners’ brief stated that the conflict between federal and state laws forced companies to engage in administrative acrobatics to offer equal benefits to all employees “to compensate for the discriminatory effects of DOMA.” From a bottom-line financial standpoint, corporations claimed unequal tax treatment of opposite-sex versus same-sex couples made it difficult to keep “morale high and recruiting new talent — a persistently present issue for tech companies — becomes harder.”

Stanford University law professor Jane Schacter, who specializes in constitutional and sexual-orientation law, told Wired Magazine last year that with heavy support for same-sex marriage among young people, it had become a good marketing move to align with the demographic they covet most: “It’s almost a branding thing (for companies). ‘We’re the future.’” She added, “We’re where things are moving, not where they’ve been in the past. I think there is very little for them to lose.”

Despite the tech leaders’ outspoken concerns for personal choice, 100 business leaders, including Salesforce’s Marc Benioff, Apple’s Tim Cook, PayPal co-founder Max Levchin, Square CEO Jack Dorsey, and others came out publicly against the “religious freedom” laws that make it possible for business owners to deny service to LGBT customers if it impinges on their personal faith and religious beliefs.

After the Supreme Court ruled 5 to 4 that same-sex marriage was a legal right in all states, the Silicon Valley social media celebration went viral:

Tim Cook summed up the attitude of many of Silicon Valley’s tech leaders: “The people who are crazy enough to think they can change the world are the ones who do.”