The 5-4 ruling is a win for states, who said they were losing out on billions of dollars annually under two decades-old Supreme Court decisions that impacted online sales tax collection.