From your deion of Jie Ting and my research of Gansu map, Ma Su was at the South West of ZGL's position. ZGL's goal was to strike out at Chang An, and not take lands using Jie Ting therefore Ma Su was simply ordered to guard Jie Ting choke point from Zhang He. Even ZGL did attack Jie Ting from the North, Ma Su was already broken and Zhang He could just use the strategic point that Ma Su abandoned against ZGL while raiding ZGL's supply line. It would be a drawn out war in which ZGL's numerical advantage in troops would become a burden much quickly than Zhang He if Zhang He defended and let ZGL attack him at Jie Ting. So you see, ZGL wanted the natural defense of Jie Ting to work for him, not work for Zhang He nor he wanted to expose Shu's backdoor to Zhang He so he can lower morale of his army by raiding into Shu. While Cao Rui might be new, if he learned of the situation in Jie Ting that ZGL is stuck in fighting Zhang He there, he might gamble and use his entire army at Chang An to attack ZGL's flank. Out of these possible scenario, ZGL wisely chose retreat once his prepared battlefield advantage had been lost.
And if what you said about areas north of Jie Ting wasn't controlled by ZGL, then why did that translator of Mao's words say that Mao's words meant Mao wanted ZGL to attack Jie Ting from the north to rescue Ma Su? Does that make sense?