The Massachusetts law was principled. The government sanctions were crafted to give the appearance of being principled. The ruling, although seemingly narrow, will have a broad impact. It undermines all government procurement ordinances which have a specific ethical motivation, such as to forbid the purchasing of goods made using child or sweatshop labor, or products made from rainforest hardwoods. Had the ruling been issued in the 1980s, it would have invalidated all of the selective purchasing ordinances which helped bring about the end of apartheid in South Africa.
Courts normally punish unethical behavior.
It is rare indeed that they reject the desire and restrict the ability of individuals, and governments, to do right. The corporate trade group which sued Massachusetts, the National Foreign Trade Council, was triumphant. Halliburton was headed by Dick Cheney, until he left to become the vice-presidential candidate for the Republican Party. Previously, as a congressman from Wyoming, he opposed the application of sanctions against South Africa. Three oil companies, Unocal, TotalFinaElf of France, and Premier Oil of the United Kingdom, provide hundreds of millions of dollars to the Burmese dictatorship each year.