Bad GMs dont shop these players, youre right.
You are looking at it in playstation/armchair perspective not an actual executive with millions dollars on the line and possibly his job and reputation on the line.
Petry is playing above 20+ minutes per game and doing very good. The habs are currently in a playoff position and he is a key player on the team and for his teammates. He is signed for 3 years and there has no indication wants out. What message you sent to your team if you trade him for an average AHLer in Aho and a 2nd round pick (which is what we got for Plekanec) which is worth nothing now and possibly nothing in 4 years. You would turn the team against you, your team would be worse this year and unless you hit the jackpot with your 2nd round pick this trade would achieve nothing in the long run.
If you are a smart GM you trade from a position of strenght (agreed) but you also make sure that 1) you kill your team chemistry and momentum, 2) You have better option internally and no Juulsen is not ready to step in for Petry not even close,
3) You have depth and competition ready to step in.. Next year it should be the case with Brook stepping in and Fleury/Juulsen with one more year of experience.
4) Petry has way more value than you give him for.
5) Petry has a NTC and the NYI are most likely on it.