OnGUI gets called multiple times per frame. It gets called at least twice, once with a layout event and once with a repaint event. If you click a GUI element it gets called with mousedown and mouseup (not always in the same frame). It can go higher in some circumstances.
In contrast Update will only get called once per frame.
Based on this you would typically prefer Update over OnGUI, unless you are using the GUI or GUILayout functions. For something that does not change every frame you would typically not do it in either function, but only call it when the value changes.
To use the unity GUI and GUILayout drawing functions you must put them in OnGUI. That is its purpose and it ensures that they get drawn on top of everything else. Many of them simply will not function in the context of Update.
In terms of doing other work, both OnGUI and Update get called once per frame so you should be limiting the work you do in either to only what is necessary.