Interesting climb in citation CJ4 out of Denver

This morning when I was climbing out of Denver in the citation CJ4 I noticed when I engaged my auto pilot below 15,000 feet the plane initially did not follow on screen navigation. NAV switch was on. However once about 15,000 feet the plane banked west and began to follow on screen navigation. Could this be due to the mountains just west of the Denver airport or was this a bug? Either way it was a beautiful flight into Jackson Hole.