The situation in question is with respect to the government, which under the previous administration was imposing these requirements on government departments and contractors by executive order.
But there have also been attempts to interpret parts of the Civil Rights Act to prohibit "disparate impact" which would effectively require DEI because neutral hiring practices could otherwise result in disparities in outcome as a result of external factors.
Here I thought that employers created them of their own volition. Could you perhaps cite the law that forced them into existence?