In 2008 the state of New York passed a law asserting sales tax jurisdiction over Amazon.com sales to New York residents. New York was aware of Amazon affiliates operating within the state. In Quill Corp. v. North Dakota, the US Supreme Court ruled that the presence of independent sales representatives may allow a state to require sales tax collections. New York determined that affiliates are such independent sales representatives. The New York law became known as "Amazon's law" and was quickly emulated by other states. While that was the first time states successfully addressed the internet tax gap, since 2018 states have been free to assert sales tax jurisdiction over sales to their residents regardless of the presence of retailer affiliates.
In the case of cost per mille/click, the publisher is not concerned about whether a visitor is a member of the audience that the advertiser tries to attract and is able to convert because at this point the publisher has already earned his commission. This leaves the greater, and, in case of cost per mille, the full risk and loss (if the visitor cannot be converted) to the advertiser.