Washington state has adopted sweeping facial recognition laws seen as a national model, much to the pleasure of Microsoft president Bill Smith.

“This legislation represents a significant breakthrough — the first time a state or nation has passed a new law devoted exclusively to putting guardrails in place for the use of facial recognition technology,” Smith wrote in a blog post.

But why is Microsoft so happy about new tech restrictions coming to its own home state? Probably because the company helped create them.

Microsoft lobbied hard for the bill, which was sponsored by own of its own employees: State senator Joe Nguyen, a senior program manager at the software giant.

[Read: Snowden says the surveillance states we’re creating now will outlast the coronavirus]

Washington’s new rules are more detailed than those in any other US state, many of which have no laws about facial recognition at all. But they’re also much laxer than cities such as San Francisco, which has outright banned local agencies from using the tech.

That means Microsoft can still cash in when customers in Washington want facial recognition tech, whether it’s identifying customers or searching for suspected criminals.

Even better for Microsoft, some of the rules are to the company’s benefit.

The law only permits government agencies to use the software if it’s got an application programming interface (API), or some other tech that tests performance across different groups of users. It also requires vendors to reveal any reports of bias.

Smith cheerily noted that what’s good for the public is also good for business, as the testing will help companies improve the tech — and convince customers it works.

“Washington’s new law shows how regulation and market forces can move forward together in a way that advances innovation to meet public needs,” he said.

Why big tech is backing regulation

Now that the backlash against big tech made new regulation inevitable, Silicon Valley giants have been focusing on influencing the rules that govern them.

Facebook founder Mark Zuckerberg has endorsed federal privacy legislation, Jeff Bezos says Amazon is generously writing facial recognition laws to pitch to lawmakers, and Alphabet boss Sundar Pichar has called for AI regulation.

Pichar gave a hint of the motivations during a January policy speech in the EU’s hometown of Brussels:

“Sensible regulation must also take a proportionate approach, balancing potential harms with social opportunities,” he said. “This is especially true in areas that are high risk and high value.”

Facial recognition has particularly high risks and high value. The surveillance software is a powerful security tool, but it also threatens privacy rights and is notoriously biased against women and people of color.

In fairness to Washington’s legislators, some of the state’s new rules will help protect civil liberties. Before using facial recognition, agencies will have to first give public notice, hold at least three community meetings, and publish a report on the potential impact

Humans will have to review any decisions based on the tech, such as verifying the identity of somebody it’s flagged for attention, and law enforcement agencies will need a warrant to use it in their investigations.

It’s better than no limits at all, but that doesn’t make it good enough — whatever Microsoft says.