When you are forced to admit to being wrong it can be hard to swallow, or at least that is the sensation described by the idioms to eat crow, to eat dirt, to eat your hat, or to eat your shoe. These are all unpleasant things to eat, just like admitting your faults can be unpleasant to do.
The most interesting of these idioms however, is to eat humble pie. The origin of this was a legitimate dish called umble pie. Umble pie was an actual food eaten by the poor, as it was mostly deer entrails. Umble had nothing to do with humble, but rather evolved from the French word nomble which means innards. People began to hear ‘humble pie’ and the rest is history. It was assumed that to eat this pie was as terrible as the sensation of being humbled. Now eating humble pie is just an idiom like to eat crow.