That's because it's being used as a reference to the files property. If you don't know what that means, do some reading on Google for "pass by value vs pass by reference."
What you need to do to copy the value unfortunately is something like this:
var files = (function() { return document.getElementById("upload").files; })();
In order to copy the value with no reference to the .files
property.
The simplistic answer of what is happening here is that var files
references the memory address of the files
property of that DOM element. It looks to you like it's copying the value when in fact it is pointing to that memory slot and access it is just following a trail to whatever is stored there and accessing it.