When the Romans had occasion to express the notion that we have in mind when we use “putting the cart before the horse,” they did it by the compound word praeposterus.
Freely translated, that means “the before coming after,” from pre, before, and posterus, following.
The exact meaning of our word preposterous is, therefore, “inverted; in a reversed order”; but because things reversed or turned upside down are contrary to the natural order, preposterous has also taken the meaning “nonsensical, utterly absurd.”