This is a rephrasing of Thoerem 13 of Chapter 2 in Real Mathematical Analysis by Charles Pugh.
Theorem (Inheritance Principle). Every metric subspace $X$ of metric space $Y$ inherits its topology from $Y$. More precisely, every subset $U \subseteq X$ is open in $X$ if and only if there is a subset $V \subseteq Y$ open in $Y$ such that $U = V \cap X$.
This shows why the relative interior of $U$ is defined as
$$\mathrm{ri}(U) = \{x \in U: \exists \epsilon > 0, B_{\epsilon}(x) \cap \mathrm{aff}(U) \subseteq U\},$$
which is the set of points for which there exists an open ball in the background metric space such that its intersection with the affine hull containing $U$ lies inside $U$. Compare this to the definition of interior of $U$ which reads as
$$\mathrm{int}(U) = \{x \in U: \exists \epsilon > 0, B_{\epsilon}(x) \subseteq U\}.$$
Here, $\mathrm{aff}(U)$ plays the role of $X$ and $B_{\epsilon}(x)$ is an open ball in $Y = \mathbb{R}^n$. The theorem tells us that $B_{\epsilon}(x) \cap \mathrm{aff}(U)$ is open in $\mathrm{aff}(U)$, which are the open neighborhoods we really want for determining interior points of $U$.
Example. Take $U = \{(x_1, x_2, 1) \in \mathbb{R}^3: |x_1| \leq a, |x_2| \leq b\}$ with $a, b > 0$ and $Y = \mathbb{R}^3$. Here, the affine hull containing $U$ is $\mathrm{aff}(U) = \{(x_1, x_2, 1): x_1 \in \mathbb{R}, x_2\in\mathbb{R}\}$. Clearly, $U \subseteq \mathrm{aff}(U)$ but it is not open in $\mathbb{R}^3$ since no three dimensional ball can be contained in $U$ and $\mathrm{int}(U) = \varnothing$. Now, let $B_{\epsilon}((x_1, x_2, 1)) = \{(x_1, x_2, x_3): x_1^2 + x_2^2 + (x_3 -1)^2 \leq \epsilon^2\}$. If we use the two dimensional disks $V = B_{\epsilon}((x_1, x_2, 1)) \cap \mathrm{aff}(U)$ for investigating the interior points, we get $\mathrm{ri}(U) = \{(x_1, x_2, 1) \in \mathbb{R}^3: |x_1| < a, |x_2| < b\}$.
Exercise. Try to imagine $U$ as half of a sphere in $Y = \mathbb{R}^3$. What are $\mathrm{int}(U)$ and $\mathrm{ri}(U)$? If $U$ is a circular arc in $Y = \mathbb{R}^2$, answer the same questions. What does happen if $U$ is a torus in $Y = \mathbb{R}^3$?