I'm making two comments in the comment you're responding to:
1. The article headline is a bit misleading, and should've said something like: Amazon pulls out of CT due to a tax-law change. Even, Terrible CT Tax-Law Change Drives Amazon Out, or something. As it's written, I thought that CT had banned affiliate programs; in a rush to editorialize, the headline author sacrificed clarity about agency. Of course, maybe everyone reading is already following the saga, so I was the only briefly confused person, but nonetheless it seemed like an easy problem to avoid.
2. Amazon is probably pulling out in part due to, as you say, a feeling that this would set a negative precedent for their business, not solely due to the CT case taken in isolation.
Your slavery example seems off the mark; Amazon is not taking action due to moral opposition to CT's tax policy, but because it's bad for their business. They happily do business in states with all sorts of unethical laws without complaining about them, as long as those laws don't impact their profits.