If you want to calculate dynamic on the fly that we cannot script, say a what-if analysis that would require sliding of the slider or input box value that we do not have yet. These values would be assigned to variable and then set analysis would be used using that variable.
I sort of differ on the efficiency, set analysis is slower comparatively when done at script level.
However set analysis allows to make selections other than the selection that has already been made on the dashboard.
This is a huge subject to deal with, these were the quick points that I could think of on this question. There is of-course a lot more.