A search, to be legal, almost always requires probable cause (with only a few exceptions not relevant here). Some searches also require a warrant, but not all searches.
The issue of searching automobiles first came before the Supreme Court in Carroll v. United States (1925), involving prohibition agents searching a car for bootleg liquor. The Court said that a search of a car needed probable cause, but not a warrant, because otherwise the suspect could drive the car away before the agents could get a warrant.
In a batch of drug cases that came before the Court in the early 1970s, the defendants argued (and the Courts' more liberal justices agreed) that the police should detain the car, or tow it to the police station, and then go to a judge for a warrant. The Courts' majority (led by Blackmun and Rehnquist) rejected that argument, and said that people have a "lesser expectation of privacy" in a car than in their house.
If you find that explanation not very satisfactory, I agree with you, but that is the Court's rationale.
I find the court's explanation far from satisfactory. And from what I had read they never before considered the use of a dog a "search". Today they said it is so that begs the question why must Americans forfeit their search and seizure rights simply because they are in a car in public?