More than 500 companies have earned a perfect score in the 2017 Human Rights Campaign Corporate Equality Index, marking a record high for the annual list.

The 517 perfect scorers in the recently released index, which rates companies based on how LGBT-friendly their benefits and employment policies are, include Apple Inc., General Motors Co., and Wal-Mart Stores Inc., which just this year added insurance coverage for transgender employees.

The record number of companies earning 100-point rankings demonstrates a growing momentum among American corporations advocating for LGBT rights at a time when workplace protection legislation has stalled at the state and federal level. While it is still legal to fire an employee for his or her sexual orientation in 28 states, the policies adopted by companies such as Wal-Mart in recent years may be a more accurate reflection of changing societal attitudes towards LGBT rights.

"This is one of those civil rights issues where the private sector is leading, and the government is lagging behind," says Patrick Egan, an associate professor of politics and public policy at New York University, in a phone interview with The Christian Science Monitor.

Acceptance of the LGBT community in the US has grown dramatically in recent years, research shows, with younger generations leading the trend. And as it becomes increasingly important to Americans that the businesses they support adopt stances on social and political issues, experts say that introducing LGBT-friendly policies are an easy, often-inexpensive way to attract a more diverse pool of employees while appealing to non-LGBT workers and customers with similar values.

For many corporations, progressive employment policies and public positions are "both a wise business decision and an exercise of their corporate conscience," says Danielle Weatherby, an associate professor in the University of Arkansas's School of Law, in an email to the Monitor. "Implementing inclusive personnel policies helps attract a diverse and talented 21st century workforce, while simultaneously building trust and loyalty among an increasingly diverse consumer base."

"Certainly, mega-corporations like Walmart are conscious of the way they are publicly perceived," she adds. "But they are also successful enough and well-established [enough] to serve as corporate trailblazers on issues of national concern. Taking a stance on LGBT-related issues achieves both ends."

While the shift may seem relatively sudden to some outside observers, experts and advocates say the increase in inclusive policies is the result of years of internal discussion and campaigning by LGBT rights activists.

"If we go back to the early 1990s, that’s when we start to see corporations starting to listen more and have conversations internally related to LGBT issues," Lee Badgett, an economics professor at the University of Massachusetts, Amherst, told the Huffington Post earlier this year. "Businesses were the first institutions to recognize same-sex couples, it just took them a while to see that as also being relevant for public policy, not just internal policy."

A major turning point for the corporate LGBT advocacy movement came in 2011, when New York became the largest state to legalize same-sex marriage, says Deena Fidas, the director of the workplace equality program at Human Rights Campaign.

From that point forward, "the business voice grew from just 'it's the right thing to do' to 'it's good for our business,'" Ms. Fidas explained to the Washington Post: for example, she says, logistics are made easier if companies can adopt the same policy in every state. "In a major way, the state-to-state marriage fights warmed us up to the moment we are in now."

A number of corporations have since taken their advocacy a step further by not only introducing internal policies, but extending their vocal support of LGBT rights outward to influence public policy. Over the summer, almost 70 major corporations signed an amicus brief in opposition to a controversial North Carolina bill requiring transgender individuals to use the restroom corresponding with their birth certificate. The Religious Freedom Restoration Act in Indiana saw similar backlash in 2015, eliciting a torrent of public criticism from companies including Apple and Wal-Mart.

"I think there's sort of a second order effect where these companies are not only adopting worker-friendly policies, but are also sort of changing the corporate culture to be more friendly to LGBT issues, and including them in the wider umbrella of groups that fall under a diversity rubric," Professor Egan tells the Monitor. "We're seeing a concurring theme among corporate culture, including the public stances they take on issues and the policies they adopt and they way they conduct business."

As the youngest generations of Americans move into positions of power within these corporations, advocates say they don't foresee the momentum of the trend letting up anytime soon.

"People who are going to swell the ranks of the tomorrow's workforce and are entering the workforce now and also the people that are going to have buying power moving forward are largely embracing LGBT equality," Fidas, of Human Rights Campaign, told Time last spring.