At issue here is sales tax. By state law, the tax is owed by the citizens to the state no matter where they make the purchase. To make enforcement easier, the tax is supposed to be collected by businesses. In theory the tax is owed regardless, but as a practical matter when businesses do not collect the tax, customers don't volunteer the information and the state loses revenue.
This annoys states to no end. However courts have long ruled that a company that is not in a state cannot be forced to be regulated by that state, even if it does businesses with residents from that state. They can't do that because that is interstate commerce, which the Constitution says is regulated by Congress, not the states. But if the company has a presence in that state, then it can be forced to obey state regulations, even if the actual commercial act crosses state boundaries.
This is all old hat, and was settled back in the 1800s with catalog companies.
The new twist here, that several states (now including California) have pursued, is declaring that the existence of an affiliate program with state residents is a business presence in that state. Because it is a presence, they can make Amazon collect taxes.
Amazon's position is that affiliates are not Amazon employees, and are not a presence of Amazon in that state. And therefore those laws are unconstitutional. However Amazon has chosen to not contest these laws in court. Instead Amazon has chosen to cut off all affiliates in any state that tries this tactic. It thereby guarantees that it no longer has a presence in that state, and it doesn't go about trying to collect taxes from people in that state.
The net result is that Amazon loses some business, the state continues to not get taxes, and some residents lose a source of income.