There's a short answer and a long answer here. The short answer shows that this is a reasonable definition of a slope. The long answer shows a cleaner connection with the Pythagorean Theorem and how this really is a hypotenuse of a relevant triangle.
Short Answer
For small distances, the rise of a function $f(x,y)$ is approximately $f_x D_x + f_y Dy$, where $f_x$ denotes the $x$ derivative and $D_x$ denotes the distance in the $x$ direction (similarly for $y$). As the distances get smaller, this approximation becomes more exact (this is a differential). So the rise over run in this this direction $(D_x, D_y)$ is given by
$$ \frac{f_x D_x + f_y D_y}{\sqrt{D_x^2 + D_y^2}} \tag{1}.$$
A well-known theorem from multivariable calculus is that the gradient gives the direction of greatest ascent. The gradient gives the direction $(f_x, f_y)$. If we use the gradient as our source of $(D_x, D_y)$ in $(1)$, then we get
$$ \frac{f_x^2 + f_y^2}{\sqrt{f_x^2 + f_y^2}} = \sqrt{f_x^2 + f_y^2},$$
and so this is the slope of the function $f(x,y)$ in the direction of greatest ascent (in the sense that this is a local approximation of rise over run in that one particular direction).
If you want to convert this to an angle, you take arctangents, as is normal. So this is a purely mechanical way of understanding why.
Longer Answer
A surface is given by an equation $f(x,y) = z$. It is in this two-dimensional sense that we thought about this above. But let us now think of this as
$$F(x,y,z) = z - f(x,y) = 0 \tag{2},$$
so that our surface is a level curve of a 3-dimensional function. (It might be useful to remind yourself that the graph of a 3-dimensional function is a four-dimensional object).
The gradient of $F$ is $(-f_x, -f_y, 1)$ and always lies perpendicular to the level surface. So the vector $(-f_x, -f_y, 1)$ will always be normal to our surface. Slope is a measure of hoe much this normal vector is in line with "up", which is $(0,0,1)$.
But there is a key difference. If the slopes are $0$, then the normal vector will be $(0,0,1)$, which points straight up. But if the slopes are huge, then the normal vector will be almost horizontal. By looking at the normal vector, we have turned the problem into a problem about slope with respect to the vertical axis.
What is the slope with respect to the vertical axis of the vector $(-f_x, -f_y, 1)$? As posed, this question is a bit ill-defined. But what's clear is that the $z$ coordinate is in line with the vertical axis, while $-f_x$ and $-f_y$ are perpendicular. So the "rise" in this case should be the contribution of $-f_x$ and $-f_y$, while the "run" will from the $z$ coordinate, which is $1$ in this case. If we go $-f_x$ in the $x$ direction and $-f_y$ in the $y$ direction, how much total distance have we gone? We've gone $\sqrt{f_x^2 + f_y^2}$ (and this is how the Pythagorean Theorem comes into play).
Then the "slope" with respect to the vertical axis is given by
$$\frac{\sqrt{f_x^2 + f_y^2}}{1} = \sqrt{f_x^2 + f_y^2}.$$
In summary, the Pythagorean Theorem makes sense here because we have transitioned to thinking about normal vectors, which flips the problem over. In this case, adding distances becomes straightforward.
Understanding why these two are related is very much incorporated with the basic proofs of the gradient and level surfaces. But that aside, I hope you have some understanding how $\sqrt{f_x^2 + f_y^2}$ gives a reasonable interpretation of slope.