If $f:\mathbb R\to \mathbb R,$ and $f$ is not injective, we can’t find an inverse function.
We can find inverse functions to the restriction of $f$ to a subset $S\subseteq\mathbb R,$ when $f$ is injective on $S.$
Ideally, we’d find an $S$ such that $S$ is simple (say an interval) and $f(S)=f(\mathbb R).$ Thus we’d have a bijection $S$ with the entire range of $f.$
A common example of this is $f(x)=x^2.$ We choose to define a pseudo-inverse using a range $S=[0,\infty),$ and we call the function $\sqrt x:[0,\infty)\to[0,\infty).$ We could have chosen the negative inverses, instead, but there is a stronger reason for picking the positive square roots - we get $\sqrt{xy}=\sqrt{x}\sqrt y$ for $x,y\geq 0.$ If we choose the negative square root $g:[0,\infty)\to (-\infty,0]$ we’d get $g(xy)=-g(x)g(y),$ which is just slightly more complicated.
The positive square root also composes well with $\sqrt{\sqrt x}$ being a suitable definition of $\sqrt[4]x.$
There are other reasons we choose the positive square root, but I’ll skip them here.
There are less compelling reasons for specifically choosing $[-\pi/2,\pi/2]$ for the range of $\arcsin x.$ At heart, we choose this range just because we prefer numeric symmetry around zero. It is almost entirely an aesthetic decision.
One aesthetic reason is that our first definition of $\sin x$ and $\cos x$ in terms of geometry, is often only on $[0,\pi/2],$ in terms of right triangles and side lengths. So we are most comfortable thinking about those angles. The largest interval containing $[0,\pi/2]$ on which $\sin$ is $1-1$ is $[-\pi/2,\pi/2].$
The same is true for $\arccos.$ The largest interval we could use for the domain of $\arccos$ containing $[0,\pi/2]$ is $[0,\pi].$
Sometimes, $\arcsin$ is written $\sin^{-1},$ which I dislike, because it implies this is somehow defined entirely by $\sin$ and thus involves no choice. At least the name $\arcsin$ doesn’t exactly give that impression.