Based on your knowledge of the mechanism of acetal and ketal formation, you might expect that the next step would be attack by a second amine to form a compound with a carbon bound to two amine groups – the nitrogen version of a ketal. Instead, what happens next is that the nitrogen is deprotonated, and the electrons from this N-H bond ‘push’ the oxygen off of the carbon, leaving us with a C=N double bond (an imine) and a displaced water molecule.