Proving that $NPSPACE\subseteq PSPACE$ using the proof of Savitch's Theorem
I had the same thoughts when i did Complexity course myself.
Its a very simple answer - the graph is stored on the tape and even though it is part of the input, its not calculated as part of the space complexity of the machine. 
This is by definition of space complexity analysis.