A function has a certain domain, and a certain target space. For example addition of real numbers can be thought of as a mapping $\Bbb{R}\times\Bbb{R}\to\Bbb{R}$, $(x,y)\mapsto x+y$. Similarly multiplication of real numbers can be thought of as a mapping $\Bbb{R}\times\Bbb{R}\to\Bbb{R}$, $(x,y)\mapsto x\cdot y$.
Now, here comes the problem with division by zero. The set of real numbers with the usual definitions of addition and multiplication form a field. Let's go systematically in this manner of presentation, since that's what you seem to want. Our (inevitably doomed) goal is to somehow define a division operation $\Bbb{R}\times\Bbb{R}\to\Bbb{R}$, meaning we take an input of two real numbers and output a unique real number $(x,y)\mapsto \frac{x}{y}$. Let us now be more precise about the fraction symbol.
For any $x,y\in\Bbb{R}$, consider the following set of numbers
\begin{align}
D_{x,y}:=\{z\in\Bbb{R}\,|\,\, x=z\cdot y\}
\end{align}
Here are some statements we can make: for any $x\in\Bbb{R}$ and $y\in\Bbb{R}\setminus\{0\}$, the set $D_{x,y}$ consists of a single element. This is because $\Bbb{R}$ is a field, meaning by definition every non-zero element has a (necessarily unique) multiplicative inverse. Next, for any $x\in\Bbb{R}$, we have that $D_{x,0}=\Bbb{R}$.
So, to define "division" we can take two routes. One is the standard way, and the other is not.
We can define the mapping $\Bbb{R}\times (\Bbb{R}\setminus\{0\})\to\Bbb{R}$, where we take $(x,y)$ and map it to the unique element of $D_{x,y}$. This is our usual notion of division.
We could define a new mapping $\Bbb{R}\times\Bbb{R}\to 2^{\Bbb{R}}$, where $2^{\Bbb{R}}$ refers to the power set of $\Bbb{R}$, i.e the set of all subsets of $\Bbb{R}$. The definition is $(x,y)\mapsto D_{x,y}$. There is no way to modify this function to have a target space of $\Bbb{R}$, i.e what is nonsense is trying to modify this function to have $\Bbb{R}$ as target space.
So, the extra layer of abstractness one has to deal with (dealing with the level of sets of sets) just to take into account $0$ is simply not worth it. The larger target space $2^{\Bbb{R}}$ is just unwieldy, and it is inconvenient for many practical calculations because it is not a field/vector space. Therefore, we rather adopt the first alternative: restrict the domain and deal with a manageable target space as opposed to allowing a larger domain but an ugly target space.
Summarizing: it is our (very reasonable) desire to keep $\Bbb{R}$ as the target space (and the field axioms for $\Bbb{R}$) which forces us to say division by zero is undefined (as a real number).
Coming to your comment about square roots. We can do a similar thing: for any $x\in\Bbb{R}$, we can consider the set $S_x:=\{y\in\Bbb{R}\,|\, y^2=x\}$. If $x<0$, then $S_x$ is empty, if $x=0$ then $S_0=\{0\}$ has a unique element of $0$, and lastly, if $x>0$, then $S_x$ has exactly two elements; one of them is positive, the other negative. So, we could define either of the following functions:
- $\sigma:\Bbb{R}\to 2^{\Bbb{R}}$, $\sigma(x):= S_x$. So this is the set-valued real-square root.
- Alternatively, we can define $\sqrt{\cdot}\,\,:[0,\infty)\to [0,\infty)$, by defining $\sqrt{x}$ to be the unique non-negative element of the set $S_x$. So, in this definition $\sqrt{0}=0$, $\sqrt{4}=2$, $\sqrt{(-3)^2}=3$ and so on.
Again, the question is one of compromise. Larger domain here requires a larger target space, which is ugly. Or we could restrict our domain and deal with the much simpler target space $[0,\infty)\subset\Bbb{R}$. We obviously adopt the second because it makes arithmetic and notation easier.
I should of course emphasize that this definition of $\sqrt{\cdot}$ is completely arbitrary. We had to make a choice (but once we made this choice nothing is arbitrary anymore); we decided by hand that $\sqrt{\cdot}$ only outputs non-negative real numbers, because we humans like non-negative numbers.