When Lij Shaw's daughter was born, he decided to work from home so he could spend more time with his family.

A record producer in Nashville, Shaw found a slightly offbeat solution to achieving work-life balance: Investing over $100,000, he completely soundproofed his house's detached garage and transformed it into The Toy Box Studio, a professional recording space featuring state-of-the-art digital equipment and classic analog devices. Over the next decade, Shaw hosted countless musicians, one of whom even mixed the album that won the first ever Grammy Award for Best Roots Gospel Album. During this time, not one of his neighbors ever complained to Shaw about noise, traffic, or anything else regarding his studio.

Nonetheless, in 2015, Nashville's code enforcement ordered Shaw to cease and desist. Only by dropping the studio's recording rates from his website and removing its address from Google Maps was he able to escape prosecution. Business for the studio—Shaw's main source of income—plummeted.

Nashville's zoning code bars most businesses from serving clients in the owner's home. Shaw tried to have his home rezoned. But though he received overwhelming support from dozens of neighbors and even some members of the city's planning commission, the Nashville Metro Council denied his application. And so in December, Shaw—along with the Institute for Justice, where I work, and the Beacon Center of Tennessee—filed a lawsuit challenging Nashville's client ban for home occupations. "A man's home is his castle," he says. "I should have the right to earn a living in mine."

The prohibition "makes outlaws out of perhaps thousands of Nashvillians who…are simply trying to earn an honest living," according to the suit. There are at least 1,600 home-based enterprises in operation in the city, and since many such companies are forced to operate illegally, the true count is most likely even higher.

Joining Shaw in his lawsuit is Pat Raynor, a licensed cosmetologist who similarly had her home-based salon destroyed. She tried three different ways to gain legal recognition for the business, yet six years later, Raynor still cannot see clients in her own home.

Nashville is hardly alone in restricting these businesses. In Dunwoody, Georgia, the City Council unanimously denied a permit to Rhett Roberson, a board-certified therapist, who wanted to turn his basement into a physical therapy space. Several of his neighbors had vigorously lobbied against his application, with one claiming that allowing Roberson to see clients on site would be a slippery slope to other clinics opening in the area, including "psychiatrists treating sex offenders or even veterans with PTSD."

A few miles west in Cobb County, Georgia, code enforcers actually cited the popular gaming vlogger Justin Chandler for earning a living as a "professional YouTuber." With the nom du jeu "KOSDFF," Chandler currently has over a million subscribers to his channel. But by uploading gaming videos and making money from content produced at home, the county claimed he was operating an unlicensed residential business. His income doesn't even involve seeing clients at his house, but to avoid further legal trouble, he handed over $470 for a license.

Many cities across the country, including Los Angeles, Nashville, San Francisco, and Washington, ban home-based companies from having more than one employee who isn't a resident. By capping payroll so severely, these jurisdictions needlessly prevent entrepreneurs from growing their businesses and creating new jobs.

According to a survey published by the U.S. Census Bureau in 2016, home-based businesses generated nearly $632 billion in total revenue in 2012. In fact, slightly more than half of America's businesses were primarily home-based. Many iconic American companies began as little more than dreams in their founders' houses. Apple, Google, and Hewlett-Packard were started in garages in Northern California; Walt Disney drew the first Mickey Mouse cartoon in a studio at his home.

Fortunately, lawmakers are starting to develop more respect for private property rights. Last year, Utah banned cities and counties from imposing licensing fees on these businesses. And a few months before that, Chicago changed a rule to allow such enterprises to hire non-residents as couriers and the like—so long as they work outside the home in question.