About hidden state, %history -p in "learn jupyter notebook install task 6/12"

I still dont get this thing about the hidden state and ‘%history -p’ command

my suspicion is that if we click on “restart and clear output” - we dont actually erase previous variables right? the variables are still there?

can u explain? someone?