Well the following paragraphs from the cricinfo report are interesting read:
Typically, given the situation, there has been speculation that he had taken the decision after having been dropped from the last Test against Sri Lanka in Kandy, a Test Pakistan ultimately won. One senior journalist told Cricinfo that Afridi had been angry with the team management over his axing and decided, in the heat of the moment, to `retire.' Television commentators had also expressed considerable surprise over the decision and given how valuable a Test player he had been since his recall, the reaction wasn't a surprise. Afridi though was quick to deny this: "No, absolutely not. There was no pressure, no spat. It is just too much cricket and that is it. It is not a permanent thing anyway." Afridi earlier told a local television channel that he hadn't yet informed the PCB of his decision although he had discussed it with Inzamam-ul-Haq, who told him he would respect any decision taken.
The format he has chosen to take retirement from is particularly surprising given that in the last year, Afridi has become one of Pakistan's most valuable Test players. In fact, since his recall to the Test squad in January last year against Australia, in ten Tests, he has averaged 47.44 with four hundreds and three fifties. Some of his innings, such as the 58 against India in Bangalore last March, have changed the course of the Test and with 23 wickets, he finally appeared settled in the Test side. In contrast, in 43 ODIs since Bob Woolmer's arrival as coach - when Afridi was recalled to the ODI side - he averages just under 23 with the bat, with only three fifties. His solitary century of course was the 45-ball special against India. But with the ball he has been a revelation and his bag of leggies, offies, wrong `uns and quicker ones has resulted in 51 wickets.