This is entirely caused because autopilot (Flight Management) systems are complex beasts with minimal feedback and sometimes very subtle interactions.<p>Ultimately the problem here was:<p>ALT mode was selected accidentally
ALT SEL mode was selected later, but ALT mode wasn't disengaged manually and engaging ALT SEL while in ALT mode doesn't disengage ALT mode.<p>A combination of other factors (rushed during takeoff, interruptions from ATC, unfamiliarity with the Airport) caused the workload to be such that neither pilot picked up on the numerous subtle visual clues that showed that the autopilot was not going to do what they were expecting.<p>Luckily, after descending 500ft in about 18 seconds, audible warnings in the cockpit alerted the crew that things were going awry and they very quickly remedied the situation.