Because of default to soft global scope by stevengj · Pull Request #720 · JuliaLang/IJulia.jl · GitHub. This is a bit of a sore point of Julia 1.0. If you’re interested, search for “scope” in this forum, make yourself a cup of tea or grab a beer and enjoy the read.
PS: please quote your code when posting PSA: how to quote code with backticks