The examples of mathematical formulas applied ‘elsewhere’ than where would’ve been ‘normally expected’, and which I personally found very surprising and inspiring, and sometimes even outright ‘shocking’, are the following :
1. Extending factorials to non-natural arguments : The factorial of any positive real number is the Gaussian integral of its reciprocal or multiplicative inverse : $$n!\ =\ \mathcal{G}\left(\frac1n\right) \qquad,\qquad \mathcal{G}(n)\ =\ \int_0^\infty e^{-x^n} dx \qquad,\qquad n \geqslant 0$$ which for $n = \tfrac12$ gives us the famous identity $\Gamma^2\left(\tfrac12\right) = \pi$ .
2. Extending combinations or binomial coefficients to non-natural arguments: The well-known formula $$C_n^k\ =\ \displaystyle\prod_{j=0}^{k-1} \frac{n-j}{k-j}$$ works just as well for any other values of $n$, be they negative $(\mathbb{Z}\setminus\mathbb{N})$ , fractionary $(\mathbb{Q}\setminus\mathbb{Z})$ , irrational $(\mathbb{R}\setminus\mathbb{Q})$ , or even complex $(\mathbb{C})$ ! ...
3. Extending Newton's famous binomial theorem to non-natural powers, with the help of the previous observation: For instance, $$\frac1{(a + b)^n}\ =\ \frac1{b^n} \cdot \sum_{k=0}^\infty\ C_{-n}^k \cdot \left(\frac{a}{b}\right)^k\ \qquad;\qquad\ \sqrt[n]{a + b}\ =\ \sqrt[n]b \cdot \sum_{k=0}^\infty\ C_\frac1n^k \cdot \left(\frac{a}{b}\right)^k$$ etc. , where $|a|\ \leqslant\ |\ b\ |$ . Basically, since k takes only natural values, it never ‘reaches’ its non-natural destination, therefore the sum never stops, but goes up to $\infty$.
4. Linking binomial coefficients and Gaussian integrals (both notions being usually associated with the fields of combinatorics, probability theory, and statistics) to geometric shapes known as super-ellipses $(X^n + Y^n = R^n$ , related to the equation of the circle, as well as to Fermat's last theorem $a^n + b^n = c^n$ : see Fermat curves), by means of the famous Wallis integrals $($proof by induction, using the binomial theorem) : $$\int_0^1 \left(1 - \sqrt[n]x\right)^m dx\ =\ \int_0^1 \left(1 - \sqrt[m]x\right)^n dx\ =\ \frac1{C_{m + n}^n}\ =\ \frac1{C_{m + n}^m}\ =\ \frac{m! \cdot n!}{(m + n)!}$$ which are then easily extended to non-natural arguments using the generalized expression for the factorial function described earlier at point 1 above : $$\int_0^1 \sqrt[m]{1 - x^n} dx\ =\ \int_0^1 \sqrt[n]{1 - x^m} dx\ =\ \frac{\frac1m ! \frac1n !}{\left(\frac1m + \frac1n\right)!}\ =\ \frac{\mathcal{G}(m) \cdot \mathcal{G}(n)}{\mathcal{G}\left(\frac{m\ \cdot\ n}{m\ +\ n}\right)}$$ and $$\int_0^1 \frac{dx}{\sqrt[m]{1 - x^n}}\ =\ \frac{\left(-\frac1m\right) ! \frac1n !}{\left(\frac1n - \frac1m\right)!}$$ where the value of $\left(-\frac1m\right) !$ is deduced from the reflection formula $(-x)! = (x!\cdot{\text{sinc}}[\pi x])^{-1}$ .
The connection between Wallis integrals and superelliptic areas is pretty plain and straightforward; the one between Gaussians and superellipses however quickly becomes clear if one integrates the exponential function alongside both axes, thus transforming a product of two exponentials into an exponential of a polynomial sum, which ultimately results in : $$\int_0^\infty\int_0^\infty e^{-(x^n\ +\ y^n)}\ dx\ dy .$$
5. Speaking of ‘surprising generalizations’ : Continued fractions are actually nested radicals in disguise ! If
$$\underset{_{\text{k}\,=\,0}}{\overset{n}{\Large\Xi}}\ \Bigg(a_{_\text{k}}\ ,\ b_{_\text{k}},\ \frac1{N_{_\text{k}}}\Bigg)\ =\ \sqrt[^{N_{_\text{0}}}]{a_{_\text{0}}\ +\ b_{_\text{0}}\sqrt[^{N_{_\text{1}}}]{a_{_\text{1}}\ +\ b_{_\text{1}}\sqrt[^{N_{_\text{2}}}]{\ldots\ \sqrt[^{N_{_{n}}}]{a_{_{n}}}}}}$$ then $$\underset{_{\text{k}\,=\,0}}{\overset{n}{\Large\Xi}}\ \Big(a_{_\text{k}}\ ,\ b_{_\text{k}},\ -1\Big)\ =\ \cfrac1{a_{_0}\ +\ \cfrac{b_{_0}}{a_{_1}\ +\ \cfrac{b_{_1}}{\ddots\ {a_{_n}}}}}$$ Also, $$\underset{_{\text{k}\,=\,0}}{\overset{n}{\Large\Xi}}\ \Big(a_{_\text{k}}\ ,\ 1,\ 1\Big)\ =\ \sum_{k\,=\,0}^n a_{_\text{k}} \qquad\qquad;\qquad\qquad \underset{_{\text{k}\,=\,0}}{\overset{n}{\Large\Xi}}\ \Big(0,\ a_{_\text{k}}\ ,\ 1\Big)\ =\ \prod_{k\,=\,0}^n a_{_\text{k}}$$ and $$\underset{_{\text{k}\,=\,0}}{\overset{n}{\Large\Xi}}\ \Big(a_{_\text{k}}\ ,\ x,\ 1\Big)\ =\ \sum_{k\,=\,0}^n a_{_\text{k}}\ x^k\ =\ P_n(x) .$$ :-)