Definition: A compactification of a topological space $X$ is an ordered pair $\left(Y,h\right)$, where $$(1)\quad Y\text{ if a compact } T_2\text{-space}$$ $$(2)\quad h\colon X\to Y\text{ is an embedding}$$ $$(3)\quad h[X]\text{ is dense in } Y;\text{ }\overline{h[X]}=Y.$$
My question is, does $X\subseteq Y$ need to be true? I ask this because the unit circle $\mathbb{S}^1$ is a compactification of $(0,1)$, though, its's simply not true that $(0,1)\subseteq\mathbb{S}^1$....
No, but $Y$ does contain a “topological copy” of $X$, to wit $h[X]$, which is homeomorphic to $X$ (by the definition of an embedding). It’s technically convenient not to have $X \subseteq Y$, it allows for more flexible ways to construct compacifications. And the $h$ is the way $X$ sits in $Y$, as it were. The notion of equivalent compactifications uses the embedding. It’s to make the notion “categorical”, if you know categories.