How is that states can pass laws that relate to in-state sales of cars to consumers, but apparently laws that relate to in-state sales of drugs to consumers are pre-empted by federal law?
Because there is no federal law explicitly granting the right of direct sale of cars to consumers. Also, because you're talking about permission rather than prohibition; the sale of marijuana in Colorado and Washington is legal under state law, and so will not incur prosecution by the state. It's still illegal under federal law, and can still be prosecuted in federal court under the theory of concurrent jurisdiction. The states' laws are not "pre-empted" by federal law; rather, federal law creates an entirely separate basis for prosecution in an entirely separate legal system.
An example of concurrent jurisdiction: Timothy McVeigh, the bomber of the Oklahoma City federal building, killed 168 people. He was never tried on 168 counts of murder (a crime under Oklahoma law; murder is almost invariably a state crime, not federal). He was tried on eleven counts, eight of them murder of federal officials (the other three were weapons and terrorism counts). 168 dead, and only eight counts of murder. Why? Because murder is generally not a federal crime; the federal government only has jurisdiction over the murder of certain federal employees, in this case judges and United States Attorneys.
The State of Oklahoma--a separate political entity from the United States--had jurisdiction over all 168 people who died, as well as for the hundreds injured, property damage, and weapons charges. The State of Oklahoma never brought charges on any of those. Why not? Because McVeigh was already facing a death sentence in the federal system. Charging him in state court would have been redundant, and would have expended state resources to gain a conviction and sentence that McVeigh would never serve because his federal death sentence would be carried out before he even spent a night in a holding cell in a county jail awaiting trial, let alone a state penitentiary. It would have been a waste.
The distinction, though, is important. McVeigh was indicted, tried, convicted, sentenced, and punished in the federal system under federal law. He could also have been charged under state law. In Colorado and Washington, the possession and use of marijuana is not forbidden by state law, but federal law still applies. That isn't federal law "pre-empting" state law; the feds are not commanding the states to pass and enforce drug laws. Rather, the feds are enforcing their own separate laws, as is their prerogative under the jurisprudence established by Wickard v. Filmore and Gonzales v. Raich, and bringing the case in the (entirely-separate) federal system.