Let us fix a field $k$ (algebraically closed for convenience).
Taking $\mathrm{Spec}$ is an equivalence of categories
$$ \text{$k$-algebras} \overset{\simeq}{\longrightarrow} \text{affine $k$-schemes} $$ whose quasi-inverse is taking global sections. At the same time, we also have an equivalence given by taking $\mathrm{SpecMax}$
$$ \text{affine $k$-algebras} \overset{\simeq}{\longrightarrow} \text{affine algebraic $k$-varieties} $$ with the same quasi-inverse.
Question: I cannot wrap my head around with the discrepancy of taking $\mathrm{Spec}$ in the first functor and $\mathrm{SpecMax}$ in the other. Why taking $\mathrm{SpecMax}$ for affine schemes is needed? How does this equivalence relate with the restriction of $\mathrm{Spec}$ to affine schemes?
I know this has to be related with the sentence "for algebraic schemes it is convenient to ignore non-closed points" that I have read several times but I cannot see why this is "convenient" at all.