The abstract reason for this is that $\mathbb A^2$ is $S_2$ (which follows from being smooth) and hence every regular function is determined in codimension $1$. In other words, the point is that a regular function on $\mathbb A^2\setminus \{0\}$ is a rational function on $\mathbb A^2$ and the locus of indeterminacy of a rational function on $\mathbb A^2$ is of pure codimension $1$ (think of meromorphic functions on $\mathbb C^2$), so if you leave out something of codimension at least $2$, then you cannot get new regular functions. This implies that the injection of the ring of regular functions on $\mathbb A^2\setminus \{0\}$ into the ring of regular functions on $\mathbb A^2$ is an isomorphism, but then they can't be both affine as then they would have to be isomorphic. More generally this argument shows that if $X$ is an affine variety of dimension at least $2$ and $P\in X$ is a closed point such that $\mathrm{depth}_P\mathscr O_X\geq 2$ (this is automatic if for example $X$ is smooth, or a complete intersection in something smooth, or more generally Cohen-Macaulay), then $X\setminus\{P\}$ is *not* affine.