SACRAMENTO, Calif. — As Tesla CEO and Twitter mogul Elon Musk tells it, I may be unproductive — despite the multiple articles and extensive work I produce each week — and immoral. That’s because, for the last decade, I’ve mostly worked from my second bedroom here in Northern California. My main coworker is an orange tabby named Marigold, who rarely interrupts my focus except when she insists on a belly rub.

In an interview with CNBC’s David Faber last week, Musk told the nation’s “laptop class” to get off “their moral high horse with the work-from-home bulls***.” As news reports note, many tech workers are upset about Bay Area companies suddenly requiring people to head back to their cubicles now that pandemic work-from-home orders are gone. He says remote workers are living in “la-la land.” That might be true, but his broader point isn’t.

“So people were building cars, servicing the cars, building houses, fixing houses, making the food making all the things that people consume,” he added. “It’s messed up to assume that yes they have to go to work but you don’t.… It’s not just a productivity thing. I think it’s morally wrong.”

I understand the appeal of slamming high-earning laptop junkies when the average American is stuck working in a store, restaurant, cubicle, on a farm, or in a factory — and usually earning much less money in the process. But there’s nothing immoral about working from home.

Not many people do exactly what they want to do for their work, and almost no one is paid what they think they deserve, but there’s never been a time — and rarely been a place in the history of the world — where so many people can earn a decent living in so many different ways. Certainly, the pandemic provided an unexpected shakeup of the work world. But these choices are wonderful.

I spent summers working in factories and vowed never to work on a production line again. One could argue such a disciplined and grinding work atmosphere — as I spent eight-hour shifts punching plastic sheets into buttons — builds character. (It can also build a drinking habit, given that one needs to numb the anguish after such long and boring days.) But it’s the type of work Americans rarely need to do.

Of course, every CEO has the right to require his employees to come into the office. I have no particular sympathy for employees who whine about corporate rules. There’s a strong case that, in certain professions, office work promotes collaboration. As a writer, I’ve found watercooler chats and sitting in a cubicle overhearing a fellow reporter’s loud interviews distracting — but my main work involves being in my own head (or on the phone with sources).

But while bosses are free to dictate employees’ work locations, workers likewise are free to shop around for the best gig that suits their preferences. As the job market tightened, some employers found that work-at-home arrangements lure crucial talent. The economy is heading toward recession, so employers might once again offer less-lenient terms. Many people place work-at-home allowances above a higher salary, so market conditions will rule. Who am I to say what’s best?

In my experience as an editor supervising mostly at-home journalists, I’ve found that hardworking and productive people are even more productive when they are masters of their own schedule — and the others don’t accomplish much, whether at home or in an office. Why punish the productive workers in the misguided zeal for equality?

Critics of remote work essentially say, “If everyone can’t work at home, it’s not fair for those who do.” Some populists love those themes, but the populist Right isn’t particularly concerned about freedom and the market economy. I get that my car mechanic can’t work from home, nor can a police officer, firefighter, waiter, gardener, or roofer. So what? There are reasons I never chose those careers. Your mileage may vary.

In California, the politically powerful unions have been the ones mandating a one-size-fits-all work schedule, built around antiquated factory floor and office-cubicle models. Fortunately, Musk isn’t doing what they do — lobbying for laws that limit independent contracting or insisting on wage-and-hour laws that give unions an organizing advantage. He’s only sharing a personal opinion. But he’s still wrong — not for his own companies per se, but for making it a moral issue.

California’s battle over Assembly Bill 5 — the attempted ban on independent contracting and many types of freelance work — highlighted the wide range of people from every economic class who preferred jobs outside of the 9-5 grind. Drivers for Uber, Lyft, DoorDash, and other transportation network companies obviously aren’t working from home, but they are working at their own pace and on their own schedules and usually in their own cars.

When AB5 kicked in, the victims almost entirely were working-class people who no longer could (until the law was amended with myriad exemptions) operate small businesses from home. These are not members of the “laptop classes” or people living on a “moral high horse” — but moms with kids who don’t want to be in an office all day. Working at home isn’t just about Bay Area tech hipsters.

A new report from Shopify, the Canada-based site that provides home-based businesses with a platform to sell their wares, found that in California its model serves 235,000 businesses, including their suppliers. It provides $57.6 billion in business output. That’s significant not just economically, but in the lives of individual workers.

NerdWallet found that 50 percent of businesses are home-based — and that 69 percent of startups begin at home. Those include tech startups, but also mainstream businesses that provide food and consumer goods. Just check out the fascinating TV show Shark Tank for a look at the astounding variety in the home-based business world.

The nature (and future) of work is changing. Working from home might not suit every business and individual, but it certainly isn’t immoral.