In fact, Pakistan used to be rather more of an 'agricultural country' than it is now-- with the growth of industries and other economic sectors agriculture's role/central place as part of Pakistan's economy has certainly declined over the last few years.
However, it might be useful to understand that
1. Pakistan is what used to once the north west of British (colonial) India, since circa 1840s onwards. As such, the areas comprising it, were occupied later than other areas of india (eg Bengal, Madras etc) where industry and trade/commerce etc flourished -and thus, it was 'developed' by the British colonists as a granary or agrarian area.
2. The British did much, too, to build basic agrarian infrastructure in the areas of Pakistan (esp the Punjab) eg canal networks, agrarian colonies and settements etc, and these are still in use today.
3. Traditionally, the people of this region were mostly agriculturists and tie to the land and rural scene, so it was natural for them to take up such pursuits under British rule and later, when Pakisatn became independent in 1947, to follow up.
I hope this helps.
the following link might also be useful in seeing/evaluating Pakistan's agri-performance over the years
this should i think be listed as a geography topic