I'm trying to understand Vakil's proof of the Reduced-to-Separated theorem:
Theorem: Two $S$-morphisms $\pi:U\to Z$ and $\pi':U\to Z$ from a reduced scheme to a separated $S$-scheme agreeing on a dense open subset of $U$ are the same.
Proof: Let $V$ be the locus where $\pi$ and $\pi'$ agree (we have just proved that this exists). It is a closed subscheme of $U$ (because $Z$ is separable) which contains a dense open set. But the only closed subscheme of a reduced scheme $U$ whose underlying open set is dense is all of $U$.
The sentence I've written in bold is the sentence I don't understand. Vakil doesn't say anything further, and I don't remember ever proving this fact (though I may have missed it somewhere). Can somebody help me see why this is true?