After a certain seniority the officer can be requisitioned by the Centre to work in Delhi or send him on deputation to other agencies, including agencies abroad.
A chief minister is perfectly within his rights to speak to the DC. Normally the CM's office would call him up but if the CM knows the DC from previous interactions , he might want to talk to him directly. Every state government has its favourite IAS officers who get plum postings. Other officers get transferred over and over. Ashok Khemka, a Haryana cadre officer who exposed Robert Vadra has been transferred 45 times by successive state governments.
Whenever a state government changes almost the first thing it does is to reshuffle the DCs and other IAS officers. Mayawati, akhilesh Yadav and Jayalalitha are known for wholesale transfers of DCs so they can pick and choose officers of their choice.