That black residue you get off of Aluminum is known as smut. Aluminum is a highly reactive metal and as detergents, cleaners, etc. removes (etches) some of the (highly reactive) Aluminum surface, it leaves behind some of the other elements used in the production of Aluminum, such as Copper, Silicone, etc. Strong alkali's always produce smut where acid's don't always depending on it's formula and certain acids are used as smut removers as they remove the residuals.
Dishwasher detergents tend to be fairly alkali and vinegar is a dilute Acetic acid solution.