California’s attempt to reduce the so-called pay gap through its recently passed Fair Pay Act will hurt women.

Women should be paid the same amount as men when they perform the exact same job. No one disputes that. Equal pay for equal work has been the law in California for 66 years. But now, under the California Fair Pay Act, employers must equalize pay across “substantially similar” work.

This opens up a whole new can of worms—lawsuits that will make it harder for women to get hired and harder for women to gain the work circumstances and flexibility they desire.

Equal pay for equal work is relatively clear, but what does equal pay for “substantially similar” work mean? The definition is open to interpretation.

Allegedly, a janitor and housekeeper perform similar jobs in that they both include cleaning, but the hours, conditions, and physical labor can be quite different.

Under California’s Fair Pay Act, employers will presumably have to pay both employees the same amount. This will make it difficult for employers to fill less desirable positions or positions in less desirable locations.

The film industry is big in California, and some high-profile actresses have spoken out for equal pay. After all, life is tough when your male colleague rakes in $10 million and you are left with a measly $7 million.

It will be interesting to see if these same actresses will continue to fight for “fair pay” if, say, all acting jobs in a film are deemed “substantially similar.”

After all, most actors and actresses have similar educations, similar types of experience, and they all show up for work on the same set, reciting lines written by others in front of a camera. So is it fair for famous female actress to earn $7 million for a lead role while an unknown male actor earns $1 million for his lead role, or should they be required to receive the same pay? Will government now become the arbiter of who gets paid what?

Employers should be free to pay employees based on the value they add. In today’s competitive economy, there’s little room for gender-based pay discrimination. Businesses that underpay women or overpay men will lose out to those who don’t.

The so-called wage gap that exists in California and elsewhere is the result of not discrimination, but rather the choices individuals make. Male attorneys, for example, are more likely to choose to practice corporate law, while female attorneys are more likely to choose family law. These are similar professions but with very different pay.

Law firms are a great example of how fair pay laws hurt women. Law firms typically have very equal pay—salaries are almost exclusively a function of years of experience.

The problem for women is that equal pay requires equal jobs, but many women—especially those with children—don’t want the grueling hours and high stress that often come with working at big firms. Because employers can’t maintain equal pay and accommodate women, many women leave big law firms.

After accounting for factors such as education, experience, occupation, hours of work, and other observable characteristics, the so-called pay gap all but disappears. Unobservable characteristics, such as women’s higher likelihood of choosing part-time and more flexible work, likely account for any remaining pay difference.

Attempting to fix a problem that does not exist, California’s new law will take away opportunities and choice for women. The law effectively places a risk premium on women in the hiring process.

Employers who want to avoid expensive lawsuits will hire fewer women. Women will also lose access to flexibility and other job preferences that employers cannot under the new system use as reasons for pay differences. This will particularly hurt women who are caregivers and desire fewer or more flexible hours or other arrangements such as teleworking.

Not only will California’s Fair Pay Act hurt women, but it will also hurt California’s economy. As businesses seek to avoid frivolous lawsuits and maintain autonomy over how they choose to run their businesses, this law will further advance the California exodus to states that don’t attempt to micromanage private business practices.