thats becos he's aware of his strengths and weakness.
chang'an plan ish not possible at that time, or in another perspective, too risky.
the distance is about 400km and it requires them, according to their sneak attack plans, to reach within 10days so not to alarm the enemy.
thats 40km a day thru difficult terrain. they wont be able to fight when they reach as planned. too exhausted. weiyan's plan was counting on wei commander being timid and will retreat in the face of shu army. that is a very bold bet. if wei put up some form of resistance the shu army's gonna game over. besides, weiyan only brought 5000-10000 with him. even if wei army disgard chang'an and run road, weiyan cant defend against the comeback attack from wei army.
this is the same reason why wei didnt attempt to hit shu from the same path. the risk is the same for both sides. bring small troop thru a dark tunnel and dunno whats waiting at the other side.
ZGL's plan on taking liangzhou ish becos it can provide a buffer without wei directly choking the exit point of shu. and it has relatively fertile flatland for food. but losing at jieting, the chokepoint to tianshui/liangzhou, caused his plans to fail.
ZGL's plan is a less risky huan, it also disturbed wei army and prevent them from concentrating at hanzhong. look at the map:
ZGL planned to take down liangzhou, northwest of hanzhong. even if he failed, the campaign will force wei troops at yongzhou (aka shangyong) to be busy defending, becos liangzhou defense ish weak and shangyong had to defend 2 sides.
during the time of jiangwei, jiangwei gradually gave up northwest of hanzhong but concentrated on northeast of hanzhong, directly attacking yongzhou, althou he did scored a couple of successes against liangzhou, he cannot sustain a foothold. towards the last yrs of shu, jiangwei was worried about huanghao sabotaging him in court, and concentrated his forces at eastside of hanzhong, the opposite of ZGL's plan. that gave wei army ample time to encircle hanzhong from both northwest and northeast, and shu fell in 3mths after wei army launched their massive attack.