I'm surprised I don't come across this perspective more often. ESG funds reached 15% of the total global securities market in assets under management (although much of this was merely a reclassification of existing investments). It seems very reasonable to conclude that ESG funds/scorings became the primary market incentive driving the corporate DEI initiatives we've seen rolled out this past decade.
Publicly traded companies operate under a fiduciary responsibility to their shareholders (maximizing long-term shareholder value). For consumer-facing companies one could easily argue these initiatives are part of a broader marketing/corporate branding strategy that benefits shareholders. But, for large publicly-traded companies that don't rely on retail consumer sentiment, I presume DEI initiatives were primarily a strategy to attract investment from ESG funds and help quell potential regulatory action/political controversies
I'm ultimately not sure how reasonable my take is (I have no insider experience or knowledge) but would love to hear from someone with relevant first-hand knowledge and get their perspective