I have started studying the theory of schemes using the book Algebraic Geometry I by Görtz and Wedhorn. There, they give the following definition of a locally closed subscheme:
Let $X$ be a scheme. A (locally closed) subscheme of $X$ is a scheme $(Y,\mathcal{O}_Y)$ such that $Y\subseteq X$ is a locally closed subset and such that $Y$ is a closed subscheme of the open subscheme $U\subseteq X$, where $U$ is the largest open subset of $X$ which contains $Y$ and in which $Y$ is closed (i.e., $U$ is the complement of $\overline{Y}\setminus Y$). We then have a natural morphism of schemes $Y\to X$.
My question is the following: why do they take explicitly the largest possible $U$? This seems unnatural to me. Does it make a difference if one takes any open subset $V$ such that $Y$ is a closed subscheme of $V$? Is it not the same, after composing with the inclusion $V\to U$?
I think that this probably has some meaning, so there must be some subtle point which I am missing. I have looked it up in other books and, for example, in EGA I the definition is essentially the same. In contrast, the book by Bosch defines a locally closed subscheme as a closed subscheme of an open subscheme (any, not necessarily the largest possible).