Iodide is the Leaving Group
Why does iodide leave following attack by cyanide? Can we do better than simply stating "this is what happens . . . so accept it"?
Look at the lowest-occupied molecular orbital (the LUMO) of methyl iodide. This is where the pair of electrons from cyanide will go, that is, the site of nucleophilic attack.
Build methyl iodide. Click on . Select sp3 carbon () and click anywhere on screen. Select and click on one of the free valences attached to carbon. Click on and then click on .
Select Calculations (Setup menu). Select Equilibrium Geometry from the top menu to the right of "Calculate", and Hatree-Fock and 3-21G(*) from the two bottom menus. Click on OK. Select Surfaces (Setup menu). Click on Add at the bottom of the dialog and select LUMO from the "Surface" menu. Click on OK. Select Submit (Setup menu), supply a name "methyl iodide" and click on Save.
Execution should require only a few seconds. When completed, double click on the line "LUMO..." in the Surfaces dialog. Alter the display style to your liking.
The LUMO of methyl iodide is antibonding between carbon and iodine. This means that electrons transferred into this orbital from attack of the nucleophile will weaken and eventually cleave the CI bond.