Typically if a company had affirmative action requirements for staff hiring it was because it was tied to a government contract or grant’s terms. So worse case scenario, they’d lose the contract/grant. What reactionaries are probably conflating here is rules about discrimination in hiring processes. Those could carry civil penalties, but that was in outright statements or policies of not hiring minorities/women, not anything to do with the percentage of minorities/women working there. As the Wikipedia page notes, the UC Davis policy was an internal one.
After ‘78 the outright quota system ended (conservatives acted like it was still in place), but colleges kept a kinda sorta system of having minority status count as points on an application. Mind you, this would be worth a couple points on an application with potentially hundreds of points; being an athlete is worth a few points, as is alumni status, or coming from a poor rural area (effectively affirmative action for poor rural whites). The 2023 decision struck down the points for minority status policies, but that can be easily glided around with a “poor urban area” equivalent.
One similar program that’s still around is government agencies that have MWBE requirements for contractors. A certain percentage of their contractors needs to be owned by women and/or minorities. However, this is typically not enforced that much and easy to game (wife is the owner on paper, but it’s really the husband’s business). Is the reason that SHI has a ton of government IT contracts though.