Most U.S. Supreme Court cases are born the old-fashioned way: an aggrieved party goes to a lawyer to appeal a lower court decision, and the lawyer petitions the court.

But the high-profile case of South Dakota v. Wayfair, involving state taxation of online retail sales, unfolded in a very different way. Lawyers sought out the clients—states, in this case—who were willing to lose below so they could potentially win before the Supreme Court.