Select an object and some channels in the Channel Box and then execute those lines in Maya 2014 one by one.
$selection = `ls -sl`;
select -clear;
select $selection;
The channels got unselected like you would have expected. But now, try to execute all those lines at once. … Strange isn’t it?
If you want to get rid of the selected channels in the Channel Box you have to defer the execution of the reselection:
$selection = `ls -sl`;
select -clear;
evalDeferred "select $selection";
It works this way…but it doesn’t feel responsive at all.
Now, what if you try the first commands in Maya 2013? It works well… This buggy behavior seems to be related to this bug fixed in Maya 2014:
MAYA-27405 Graph Editor : Channel box selection remains after selecting an animation curve in the Graph Editor
Instead of fixing the bug, Autodesk implemented some weird behavior in the program as a whole. One bug leads to another.
Update: If you want to go back to the old behaviour of the Channel Box when changing selection, there is a solution: Channel Box and Selection Change