When the primary fermentation finishes or is about to finish the yeast goes in a "conditioning" phase. They start converting heavier sugar like Maltotriose and byproducts produced in the primary fermentations. These byproducts can result in off flavors.
John Palmer also explain why the beer should be removed from the yeast cake if possible. It's only part of the page, I recommend reading the whole page because he says you could also leave the beer on the yeast cake... (http://www.howtobrew.com/section1/chapter8-2-3.html) I also recommend reading the whole "Fermentation" section for great knowledge
"Under some conditions, the yeast will also consume some of the compounds in the trub. The "fermentation" of these compounds can produce several off-flavors. In addition, the dormant yeast on the bottom of the fermentor begin excreting more amino and fatty acids. Leaving the post-primary beer on the trub and yeast cake for too long (more than about three weeks) will tend to result in soapy flavors becoming evident. Further, after very long times the yeast begin to die and break down - autolysis, which produces yeasty or rubbery/fatty/meaty flavors and aromas. For these reasons, it can be important to get the beer off of the trub and dormant yeast during the conditioning phase."