Thats a good question. I believe it has to do with which shader to set it on. In case the same symbol is defined in multiple shaders used in the same effect.
I am not 100% sure about that but its my best guess.
It has to do with the difference between shader variables and effect variables. The newparam elements in CFX create effect variables only. But the setparam elements allow you to set either effect variables or shader variables. I believe the program attribute is there to specify which shader. It most likely references by sid like most other things in CFX
<effect>
<include sid="source1" url="shader.cg"/>
<include sid="source2" url="shader2.cg"/>
<setparam ref="variablename" program="source1">
<float>50</float>
</setparam>
...
-Andy