Yes, you are right, context is important. Let's have a deep dive into the white ball stats of the almost 34 year old Shan Masood.
Shan has played 9 ODIs and 19 T20I with the total white ball innings at 26. Of those 26 innings he has 4 50s to his name. Of those 4 50s, Pakistan has lost in all of these games. Shan, on multiple occasions, has been put in situations were his performance would be vital in the victory of Pakistan but has failed in all of these situations.
He was given the chance to show his performance in the Australia series in 2019 by opening in all 5 games on flat tracks and he was only able to make 40 and 50 in losing causes. The New Zealand series was just the nail in the coffin, as Pakistan couldn't afford to keep playing Shan over Imam or Fakhar so close to the World Cup.
He can't play in the middle and he has shown he is an unreliable opener on flat tracks even with all the experience that he has at 34 years old. Shan simply doesn't fit into the team.
On the other hand, Abdullah Shafique is a young and up and coming batsman who has shown great resiliance in Tests multiple times (unlike Shan who has one or 2 good innings spaced out over all his career) and shown great acceleration in PSL by playing in the middle order and opening the batting. He is young, inform and most importantly versatile. Abdullah could open or be put in the middle order and we have seen his great ability against spin in test cricket.
Shan simply has not taken the chances he was given, and I think Inzamam and most PCT fans can see that Abdullah, even though unproven in ODI and even T20i, has great potential and will learn a tremendous amount from participating in the Asia Cup and World Cup like Mohammad Haris did in the last World Cup. This experience may come in use for Abdullah and the PCT in the future while Shan really only brings a lack of experience and uncertainty of performance from an old cricketer.