These are all good explanations but let me add one more:
“Hey @dmatine, could you go get me a burrito and a puppy? I need to eat it.”
The above sentence is unclear because the word “it” could be the burrito or puppy. Now, we’re smart so we go “I’m sure Zed doesn’t want to eat a puppy sooooo…” but computers are stupid so when you don’t make everything very explicit they have no idea what you mean.
What you did was write the python version of this. You said, “Hey python, open the file named filevar and print it.” Python has no idea what you mean, and looking at this code you might not either. You need a variable to save the results of the open() call so that you can be explicit and say, “Hey python, open the file named filevar, save that file in openfile, read openfile, and print the results of reading openfile.”
It’s annoying, but if you aren’t explicit and let the computer guess then you’ll potentially have a hidden bug you can’t hunt down and will be very confused. It’s better to be more verbose and clear than to be loose and leave it up to the interpreter.