Algorithms come up a lot in mathematics, especially in discrete mathematics. The obvious place is graph theory and combinatorics. You will get into things like spanning trees, path-finding, constructing independent sets, network flows, etc. Of course, you will want to solve the optimization problems as well. So understanding why the algorithms work will give you some insights into the problems.
Other areas of mathematics also come into play. For example, did you know that constructing a spanning tree is very related to constructing a basis for a vector space? We relate these with Matroid Theory, where we have a ground set $G$ and a set $I \subset 2^{G}$ where each element of $I$ is an independent subset of $G$. If $G$ is a set of vectors, $I$ is the set of all linearly independent sets of vectors.
Linear independence is also related to projective plane geometry. Co-linearity on the Fano plane can also be described using a Matroid.
Once we have our Matroid set up, we can sort the elements of $G$ and use a greedy basis algorithm to solve the optimization problem.
The theory of algorithms also gets into the theory of $\mathcal{NP}$-Completeness and complexity. It is helpful to understand the idea of a problem with (we believe) no efficient solution, and to prove it. You will also get into analyzing an algorithm's time and space efficiency. This skill is helpful if you work on the Numerical/Applied side of things, for designing and selecting efficient algorithms in your mathematical model. If you are doing a lot of high-powered and high-performance modeling, this is very useful.