Say you come home one afternoon to discover a stranger mowing your lawn. He tells you some of your neighbors hired a landscaping company to improve property values in the area. Oh, and by the way: You owe him $75. If you don't pay, he says, then you're nothing but a lousy freeloader.

Are you? Most people probably would say no. You never asked the guy to mow your lawn. You didn't even consent to the mowing—let alone to the $75 fee. Where does he get off trying to charge you for something you never asked for?

The situation looks different, however, under a slightly altered scenario. If you move into a subdivision and sign a contract agreeing to the landscaping service, then you quite clearly consented to the mowing—so pay up.

Last week the Supreme Court heard a case exploring just this sort of question. The case involved something called agency fees, which unions—the California teachers' union, in this case—charge non-members to help support their collective-bargaining efforts. Some non-union teachers contend they should not have to pay.

The legal arguments turn on the First Amendment. The plaintiffs claim that having to pay fees to the union forces them to support political stances with which they disagree. The defendants and their supporters claim that isn't true—and besides, it's not fair to let some people get the benefits of collective bargaining for free, while other people pay for them.

Much of the media coverage of the case has framed it as a fight over unionism: If the "free riders" win, then public-sector unions could be doomed, goes the argument. The implication is that the justices should first pick the outcome they prefer, and then make up a rationale that will let them reach it later. That's a terrible way to do constitutional law—though maybe not an uncommon one.

The broader fairness question, however, has all sorts of reverberations. You could argue that a California teacher who is not a union member never consented to union representation, let alone asked for it. So why should she have to pay for it? Indeed, three years ago Justice Samuel Alito wrote an opinion for the 7-2 majority in a similar case in which he quoted labor-law professor Clyde Summers, who pointed out there is no such obligation to private associations: "If a parent-teacher association raises money for the school library, assessments are not levied on all parents. If an association of university professors has as a major function bringing pressure on universities to observe standards of tenure and academic freedom, most professors would consider it an outrage to be required to join."

One possible retort: Even teachers who don't join a union tacitly consent to union representation when they take a job as a teacher, just as someone who moves into a neighborhood with a community association explicitly consents to the association's bylaws. Don't want landscaping? Move somewhere else. Don't want to pay union fees? Find another line of work.

Similar questions have come up in another case, in which a family pharmacy has appealed the Supreme Court for the right not to dispense emergency contraception, as Washington state law requires it to do, on religious-liberty grounds. And here again, one could say: Don't want to dispense contraception? Don't become a pharmacist.

Yet that seems like an extremely callous approach. As one of the pharmacy's lawyers says, "No one should be forced out of her profession solely because of her religious beliefs." What's more, the argument could cut in all sorts of directions. Last year the Supreme Court struck down a North Carolina law requiring doctors to perform an ultrasound and describe the results to women seeking abortions. The doctors who filed suit against the state also claimed that law violated their First Amendment rights. It would be easy—but wrong—to dismiss their concerns by telling them they should find employment elsewhere, or go into another line of work.

All of these cases make us ask how far society can go to compel people to act in certain ways against their consent. And while the cases' legal reach is limited, the implications are not—because government, by definition, consists of compelling people to act in certain ways against their consent.

Almost everyone accepts the need for at least some government. And almost everyone thinks government should do at least some things, such as provide for local police and national defense. But local police and national defense raise exactly the same sort of free-rider problem that union representation does. Except for naturalized citizens, few people ever explicitly agree to be governed by the authorities. So what obliges them to obey?

Political theorists have come up with all sorts of reasons— gratitude for benefits conferred, implied consent (you haven't moved elsewhere, have you?)—all of which invite various, fairly obvious rebuttals. E.g., telling a poor black resident of Alabama that she implicitly consented to Jim Crow because she didn't move to Maine seems fallacious—at best.

Since there doesn't seem to be a satisfactory general rule allowing society to compel people to act against their own consent, perhaps it would be best to do so as rarely as possible.

This column originally appeared in the Richmond Times-Dispatch.