The direct route from YYZ to PEK flies almost over the north poleYYZ to PEK flies almost over the north pole:
Sometimes, routes need to deviate a bit from the "direct" route, due to prevailing winds or other traffic. If your route from YYZ needs to deviate a bit to the right, then it will cross over to the other side of the north pole (which is the very centre of the map above), and your projected map from Flightaware would show it flying "over" the Atlantic. But really, it's just gone slightly to the right of the pole.