I was writing an article about Ogden Nash for a magazine, and went to the OED for some inspiration. I discovered that the first recorded instance in writing of the phrase "piece of cake" is attributed to Ogden Nash. In one of his poems in the collection Primrose Path there are the lines "her picture's in the papers now, and life's a piece of cake". The phrase is defined in the OED as "something easy or pleasant". The earlier word "cakewalk" also has the meaning "something easy". And, of course, something can be "as easy as pie". I don't know why cakes and pies came to be associated with something easy - they're easy to eat, I suppose, if not necessarily to make.