Editor's note: This post originally appeared in the August issue of American Banker Magazine.

When the Supreme Court this summer struck down a law that barred federal benefits for same-sex couples, it issued a ruling that at once appeared to be shaped at least in part by public opinion and no doubt will help to shape public opinion in the years to come.

Here's an issue where big banks, to their great credit, have been well ahead of the curve.

For years, the Human Rights Campaign Foundation has given Wall Street institutions and other large financial services firms high marks for offering domestic-partner benefits, for establishing policies that protect lesbian, gay, bisexual and transgender employees from discrimination, and for showing a public commitment to LGBT issues.

Why does Wall Street do this? It isn't because of civic duty, though no doubt there are many on Wall Street who consider same-sex marriage a civil rights issue. And it isn't because of a liberal political agenda by big bank CEOs, many of whom were backing gay marriage opponent Mitt Romney in the last presidential election. It's because Wall Street is a place that, for all its faults, actually prizes top talent.

The industry takes a lot of flak for attracting the best and brightest away from careers in science, education, social services and other worthy fields that generally are no match for the handsome pay packages that Wall Street has to offer. Pile on, if you like. But better yet, take a page from these firms if you want an example of how to lure and retain smart employees. It's not just about the money. Ok, it's probably mostly about the money. But if it were just money, then there would be no incentive for Wall Street firms to even delve into the gay marriage debate. Wall Street does this because it knows the preciousness of its talent, and the fierceness of the competition for it. When demand for something is that high, you do everything you can to bolster supply.

Smart employers know there are no bounds on talent that are defined by race, gender, ethnicity or sexual orientation. They know there is evidence that diverse teams are stronger teams. And they know that the promise of an equitable work place with equal benefits makes them an attractive employment option for as wide an array of talent as possible, especially among those who still have to fight so hard for these basic civil liberties. That's why executives from Lloyd Blankfein at Goldman Sachs to John Taft at RBC Wealth Management and Cathy Bessant at Bank of America have been outspoken in their support for gay marriage, arguing that it's as much a business issue as a social issue.

To bankers who disagree with what the court has done, or who use religious beliefs or cultural mores to justify the denial of equality to any group, I would politely say that you are entitled to your own opinion. But it doesn't seem to be a results-oriented attitude to bring into the workplace, and not only because of all the LGBT talent you'll be missing out on.

This is about engaging (or failing to engage) with a whole new generation of employees, customers and shareholders. LGBT or not, this generation—my 5-year-old child's generation—is going to demand equality. These young people will have gone to school with LGBT classmates and with the children of LGBT parents, and it is not going to make sense to them as to why their friends are treated any differently from anyone else.

Yes, it's possible to survive for quite a while with outmoded ideas, especially if your customers have like-minded opinions. But note all of the business leaders and politicians who say their thinking on gay rights has recently evolved. Perhaps they truly had a change of heart; more likely, they recognized that the old ideas just won't be sustainable in the long run.

Heather Landy is Editor in Chief of American Banker Magazine.