From what I understood, he was programmed to avoid obstacles... an Open Door is NOT an obstacle, so he just followed programing... He was not "insanely smart", but the last person that left, was "insanely" stupid, leaving behind an active autonomous robot with an open door!
Bottom line... Robots WILL overthrow us, Humans, not because they are getting smarter, but because humans are getting dumber!!!
just take a look at the caos a simple game has brought to society! (pokemon go)