To not know which side your bread is buttered on comes from a Yiddish folk tale describing the stupidity of the men of Chelm in Poland.
The story goes that one day, when someone dropped a piece of bread, the wisest men in town gathered to ponder why it landed butter side up.
After weeks of deliberation they concluded that the bread had been buttered on the wrong side.