[guided]We need to make precise sense of "evaluating a homogeneous polynomial at a projective point" before we can say it equals dehomogenisation evaluated at the affine coordinates.
\textbf{Why can't we evaluate $f$ at a projective point in the obvious way?} A point of $\mathbb{P}^n_k$ is an equivalence class $[x_0 : \cdots : x_n]$, with the same point represented by $(\lambda x_0, \ldots, \lambda x_n)$ for any $\lambda \neq 0$. A general polynomial $f$ does not have a well-defined value on equivalence classes: $f(\lambda x_0, \ldots) \neq f(x_0, \ldots)$ in general.
\textbf{What is preserved is the vanishing condition.} For a homogeneous polynomial of degree $d$, the rescaling identity
\begin{align*}
f(\lambda x_0, \ldots, \lambda x_n) = \lambda^d f(x_0, \ldots, x_n)
\end{align*}
shows that the value of $f$ at different representatives of the same projective point differs by a nonzero scalar $\lambda^d$. Hence $f(p) = 0$ depends only on the projective point $[p]$, not on the choice of representative. This is the only sense in which homogeneous polynomials are "functions on $\mathbb{P}^n_k$" — they have well-defined zero sets.
\textbf{Choosing the normalised representative.} On the chart $U_0$, every point has a canonical representative $(1, a_1, \ldots, a_n)$ obtained by dividing through by the nonzero $x_0$. Concretely, given $[x_0 : x_1 : \cdots : x_n]$ with $x_0 \neq 0$, take $\lambda = 1/x_0$:
\begin{align*}
[x_0 : x_1 : \cdots : x_n] = [1 : x_1/x_0 : \cdots : x_n/x_0].
\end{align*}
The affine coordinates $(a_1, \ldots, a_n) = (x_1/x_0, \ldots, x_n/x_0)$ are by definition the image $\varphi_0([p])$.
\textbf{The connection to dehomogenisation.} Substituting $X_0 = 1$ in the homogeneous polynomial $f(X_0, \ldots, X_n)$ produces a polynomial $f(1, Y_1, \ldots, Y_n)$ in $n$ variables: this is the dehomogenisation. Its value on the affine coordinates $(a_1, \ldots, a_n)$ equals the value of $f$ on the normalised representative $(1, a_1, \ldots, a_n)$ — by definition. So
\begin{align*}
f \text{ vanishes at } [p] \iff f(1, a_1, \ldots, a_n) = 0 \iff f^{\mathrm{deh}}(\varphi_0([p])) = 0.
\end{align*}
The chart and the dehomogenisation transport the vanishing condition from $\mathbb{P}^n_k$ to $\mathbb{A}^n_k$ verbatim.[/guided]