`gui` does not work with Jupyter Notebooks

One of my main frustrations with Julia is that the same code will behave differently on the REPL vs IJulia vs executed directly.

Why does the code

using Plots
gui(plot(randn(10)))

work on the REPL, but not in my Notebook?

For me, the following works in both the REPL and Jupyter notebook.

using Plots
plot(randn(10))

These are different behaviors.
gui is documented as Display a plot using the backends' gui window, which is useful if you want to visualize real-time data.

Just calling plot or display(plot(...)) in a notebook will show an inline plot.