Guan Yu is not the Jade Emperor from the stories. He was elected to the position in 1840AD thereabouts. The Jade Emperor from Sun Wukong's time is a distant predecessor. As Earnest Evans said, the Taoist and Buddhist... pantheons are unrelated. Think of it as being two nations, with Gautama Buddha and Guan Yu as their respective kings.