Acetaldehyde is a flaw in beer because it has multiple causes and generally points to process or sanitation issues. It is an intermediate stage of yeast converting sugar to alcohol, so it's presence in young beer tells you the yeast isn't finished.
Yeast: Maltose/Glucose > Pyruvic Acid > Acetaldehyde > Ethanol.
This happens swiftly and is nearly complete at the end of primary fermentation if the yeast is healthy and the wort had sufficient nutrients. In a healthy fermentation, it only takes hours to a day or so for yeast to complete the conversion to alcohol.
Post fermentation, acetaldehyde is be caused by the breakdown of ethanol. The breakdown can be from oxidation; though if that's the mechanism, you'll notice a lot of other artifacts. More often than not, the breakdown is biological as something is consuming the ethanol. The usual suspect is Acetobacter, but there are other organisms that can feed on alcohol, too. However, the process to control them is identical to controlling acetobacter, so it's moot to worry about all of them.