From Walmart to J.C. Penney, retail reflect shifting U.S. views on gay rights by Phil Wahba @FortuneMagazine June 26, 2015, 1:21 PM EDT E-mail Tweet Facebook Google Plus Linkedin Share icons Amazing how quickly things can change. Just three years ago, J.C. Penney JCP found itself embroiled in controversy when it featured gay couples in its new glossy mail-outs, part of its failed strategy under former CEO Ron Johnson to modernize the department store and help it connect with younger and hipper shoppers. Instead of winning new shoppers, Penney found itself in the crosshairs of anti-gay marriage groups, notably the National Organization for Marriage, who led a boycott of the retailer. That wasn’t why Penney’s reinvention ultimately failed, but at the time, revenue was in free fall, and the company could scarcely afford to lose any business. Penney eventually backtracked, sticking to more traditional depictions of domestic bliss in its fliers, and dumping lesbian TV personality Ellen DeGeneres as a spokesperson. Of course many companies were already publicly and loudly advocating for gay rights back then, notably Starbucks SBUX . But the fact is, until very recently, LGBT rights was a no-win issue for companies who feared offending one part of the customer base or other if they spoke up. (Look how long it took for Apple AAPL CEO Tim Cook to finally admit what everyone in Silicon Valley knew, only coming out last year.) Fast forward three years, and retailers are falling over themselves to show how progressive they are on LGBT issues. Even Walmart WMT , a company based Arkansas, deep in red territory, and a retailer that caters to a swath of the country one could presume to be more conservative on social issues, has been active on the gay rights front, repeatedly lobbying Gov. Asa Hutchinson earlier this year to veto a religious freedom bill many saw as opening a door to anti-LGBT discrimination. (The bill was essentially defanged before getting passed.) In fact, Walmart gets a 90% grade from gay- advocacy group Human Rights Campaign for how it treats LGBT employees. Meanwhile, companies that opposed LGBT marriage rights have grown quiet: witness how Chick-Fil-A, once a vocal critic of LGBT rights, has completely piped down on the issue as it gears up for an expansion into larger liberal cities, notably New York. Nowadays, many retailers even see supporting gay rights as central to its marketing and branding. Target TGT , which was also threatened with boycott by NOM a few years ago, boasted at a Wall Street meeting in March at which it laid out its turnaround plan, that it would actively advertise to gay families. And earlier this month, Target launched a line of Pride-themed merchandise. Retailers from Target to Starbucks SBUX to Macy’s M to Gap Inc GPS to Levi Strauss took to social media on Friday to praise the U.S. Supreme Court’s 5-4 ruling finding that same-sex marriage is a constitutionally protected right. (Notably, neither Penney nor Kohl’s KSS said anything.) Without casting any doubt on the sincerity of all these gay-friendly companies, one can posit that there is a real business case to support their positions. Retailers desperately want to win over young shoppers (aka millennials) as they near their peak earning years. Look at the Pew Research Center’s data from earlier this month: 73% of millennials support same-sex marriage rights. And even older generations are coming around to the idea. As Target’s chief merchant Kathy Tesija put it in March, in describing how the discount retailer’s core guest have moved beyond being the baby boomer mom. “Fast-forward to today, and that mom is still shopping Target, but our guests are so much more diverse, more Hispanic, more millennial, more urban, more families, more dads, two dads, more kids.” And then there is the matter of talent attraction. Walmart, for one, is betting big on e-commerce to continue to thrive. So it can scarcely afford to be seen as retrograde at a time it is fighting hard to snag top tech talent in Silicon Valley, where a company’s progressiveness on social issues is a litmus test for many people in choosing an employer. “Every day, in our stores, we see firsthand the benefits diversity and inclusion have on our associates, customers and communities we serve,” Wal-Mart Stores CEO Doug McMillon said in a statement in March as he sought to have the Arkansas religious freedom bill killed.