Informally speaking, the key is that this function acts radially: it only scales each vector $x$ by a numerical factor along the same line. So as long as it's one-to-one and onto on each line thru the origin, by mapping the "$[0,1]$" segment of that ray emanating from the origin onto the entire ray, the same is true for the map as a whole. (These lines have the origin in common, but it's dealt with separately in the definition of this function anyway.)
More rigorously, we could switch to polar coordinates: represent each $x\in\mathbb{R}^2$ as $x=(r\cos\theta,r\sin\theta)$ with $0\le r$ and $0\le\theta<2\pi$ to avoid ambiguity. The domain of this function is then $D^2(0,1)=\{x=(r\cos\theta,r\sin\theta) \mid 0\le r<1,0\le\theta<2\pi\}$. And the function simplifies into
$$F(x)=F[r,\theta]=\begin{cases}\tan\left(\frac{\pi r}{2}\right)\cdot(\cos\theta,\sin\theta)&, r\neq0 \\ 0 & ,r\end{cases}$$
or even purely in polar coordinates (using brackets for polar coordinates to avoid confusion with cartesian coordinates)
$$F(x)=F[r,\theta]=\begin{cases}\left[\tan\left(\frac{\pi r}{2}\right),\theta\right]&, r\neq0 \\ 0 & ,r\end{cases}$$
Now we can see that points with different polar angles $\theta$ will have different images under this function. And for a fixed $\theta$ and assuming $r\neq0$, the function $r\mapsto\tan\left(\frac{\pi r}{2}\right)$ maps $(0,1)$ onto $(0,+\infty)$ in a one-to-one fashion.