My assumption is some designer chose the three horizontal lines to suggest a list of choices. Later, for some tiny space where lines didn't fit well, they were crushed into three dots stacked vertically (which also sort of suggests an ellipsis tipped on its side?) Why we decided to use food metaphors... well, who isn't thinking about what's for lunch?
That's exactly it. Android popularized it with its early versions when those phones had physical buttons. One of those buttons was the menu list button which opened the context menu. Eventually that button was removed and was replaced with in-app menu buttons. The remaining buttons became virtual, and then bikeshedded to triangle, circle, and square because usability be damned.