In Hartshorne's Algebraic Geometry, he defines subvarieties in exercise 3.10 of chapter I as follows:
A subset of a topological space is locally closed if it is the intersection of an open set with a closed set. If $X$ is a quasi-affine variety and $Y$ is an irreducible locally closed subset, then $Y$ is also a quasi-affine variety. We call $Y$ a subvariety of $X$.
My questions are:
How is $Y$ a quasi-affine variety?
Given that $Y$ is an irreducible locally closed subset of a quasi-affine variety $X$, I know that $X$ is an open subset of an affine variety $V \subseteq \textbf{A}^{n}$, and $Y=A \cap B$ for some open $A \subseteq V$ and closed $B \subseteq V$. But how does this imply that $Y$ is an open subset of an affine variety?Why does he define subvarieties in this way?
It seems like an unnatural and needlessly complicated definition for a subobject. I think that a subvariety ought to be simply defined as a subset of a variety that is also a variety. Why doesn't Hartshorne do this?