Why ammonium hydroxide precipitates metal salts?
It's simply because of the concentration. In aqueous solution, the formation of a precipitate is favored over the formation of a complex ion, and it can be shown using solubility equilibria and $K_\mathrm{f}$ (but it won't be pretty).
This is just like the QA test for copper(II). After a small amount of aqueous ammonia is added, $\ce{Cu(OH)2}$ is observed. Add more, and you get the deep blue $\ce{[Cu(NH3)4]^2+}$ complex.