There are few angles to this story. At that time when India exploded the big bomb, Pakistan was left with no choice but to go for their explosions as well that otherwise Pakistan would have never gone for. So mainly it was to meet and reciprocate what India started.
What Dr AQ did later is...