there is a short answer, and a very long technical/chemical answer.
the short answer is that during fermentation the yeast produce a myriad of chemical by-products in varying amounts depending on a variety of conditions as well as yeast strain. When primary fermentation has neared completion, the yeast begin to then metabolize their own waste as well as produce even more waste which will react with previous waste to break it down.
if the yeast are not given time to clean up their own mess, you can/will taste it. there are plenty of ways of helping to reduce these compounds mechanically and chemically, but it is mostly not useful for a homebrewer. for that, a nice long primary is best.