What is the origin for don't put the cart before the horse?

On of the earliest citations is from a work by Cicero in 44 BCE, written shortly before his death. The title translates as "On Friendship."

"We put the cart before the horse, and shut the stable door when the steed is stolen, in defiance of the old proverb."

A hysteron proteron is a figure of speech we inherited from the Greeks, in which the thing that should come second is put first; for example, 'putting on one's shoes and socks'. It isn't surprising that, when needing an Anglicised proverb to express that notion, the English turned toward what they knew best, that is, agriculture, and in particular, horses.