Azhar, at least in the 2010s, has overall been a cornerstone of Pakistan's test line up. It's sad to see the reaction he's getting on PP, as his record and legacy proven up to 2018 were indeed respect worthy.
However, as a professional sportsmen you HAVE to retire on top. It's what defines your legacy, your reputation amongst fans and cynically, allows you future non-playing career opportunities.
As others have said, scoring that 140 odd at Old Trafford was the perfect send off. You gotta leave with fans wanting more. Look at Alasdair Cook, a batsmen in the same vein as Azhar. Arguably England still haven't replaced him properly, but he himself knew that his performances would only go downhill from where he was.
However, pro sportsmen like Azhar are almost blind in their self belief that they can keep performing, even when it's painfully apparent to others that they're done.
And I get it man. It's so painful to admit that you can't do the thing you love anymore. But this is where the coaching staff have to have that honest, facts based conversation about not only Azhar's performances, but future team planning. However, Misbah, who himself was an exception to the rule by playing well into his 40s, won't have that conversation. Misbah's man management skills would require a second more detailed thread.
I hope, whatever happens in the remaining three innings of this NZ tour, that Azhar makes a firm decision himself to call it a day. Even if he scores three consecutive tons. It's important that his replacement is able to debut in home conditions against SA. Include Azhar in the SA squad and give him a retirement farewell ceremony ala Umar Gul. That way his legacy can be respected and we can move forward.