The title of the question asks how knowing "more about math" can help in teaching calculus, while the question itself asks specifically about the math learned towards a masters degree or a doctorate. I am going to focus on the "more about math" part, regardless of the stage at which it was acquired, because the math that one person learned in grad school could be learned as an undergraduate by someone else.
A solid understanding of analysis of all kinds (such as real analysis, complex analysis, and Fourier analysis) gives an instructor in a calculus course a thorough mastery of the intricacies behind the often confusing topic of infinite series. It means the instructor understands what makes all those convergence tests work and really understands the math behind boundary behavior of power series ("at the endpoints") or forming power series expansions of the same function around different points. This can help in the construction of examples for the class that emphasize a certain issue and it means the instructor should be up to the challenge of answering almost any non-routine question calculus students may ask about infinite series.
Of course a calculus instructor who has not taken a lot of analysis courses could teach himself/herself why all the convergence tests for series work, but I think the experience of using series in more advanced coursework gives you a perspective on the value of this topic and how it gets used later that someone whose analysis knowledge ends at calculus doesn't have. It's kind of like taking high school French from someone who just knows high school French very well compared to taking high school French from someone who is actually fluent in French (assuming that both instructors actually want to teach French!). Maybe on most days the students won't notice a difference, but as soon as someone asks about something going even slightly beyond the regular curriculum, the instructor with more limited knowledge will be at a loss to answer the questions or point out connections that more mathematically experienced instructors know well.
Since you bring up commutative algebra in your question, let me give an example of how one topic from that could help an instructor understand calculus better: completions of commutative rings include as a special case the rings of formal power series $\mathbf R[[x]]$ and $\mathbf R[[x,y]]$. Some calculations with power series really work if you use just a formal manipulation of the terms, while others are genuinely numerical (convergence issues are essential for the result to even mean anything). When I was first learning calculus, I found the idea of division of power series (e.g., the ratio $\sin x/\cos x = (x - x^3/3! + \ldots)/(1 - x^2/2! + \ldots)$ near $x = 0$) a bit puzzling. Knowing about both analytic functions in complex analysis and formal power series made me much more comfortable with division of power series. (For the record, my understanding of formal power series actually came from my reading about $p$-adic analysis rather than commutative algebra.)
Knowing some number theory and complex analysis gave me a much clearer idea of what is going on with integration of rational functions in general, which if you look in a calculus textbook appears to be a large number of disconnected different cases, of which we may teach only 1 or 2 to avoid excessive hand calculation. If a student were to ask me for some intuition behind decompositions like $1/(x^3+x) = 1/x - x/(x^2+1)$, I can point out a numerical analogy: $7/(3 \cdot 5)$ can be broken up into some number of thirds and some number of fifths: $7/15 = 2/3 - 1/5$. The principle is that when you have a denominator that is a product of "relatively prime parts", you should expect to be able to break it up into a sum with those separate parts as their own denominator. It works for denominators of fractions just as much as it works for denominators of rational functions. I don't know what other people would say if a student asked for intuition behind the partial fraction decomposition process: it just works?
Knowing some algebraic geometry lets me tell students why implicit differentiation has a surprising practical application that they use without even realizing it: the security in ATM cards and other smart cards is based on elliptic curve cryptography (ECC), and the math behind ECC involves being able to compute tangent lines to points on curves like $y^2 = x^3 - x$. (Technically, ECC uses elliptic curves over finite fields rather than over the real numbers, and the equations look more like $y^2 + xy = x^3 + x + 1$ because of issues involving fields of characteristic $2$, but the basic ideas for finding tangent lines are still largely the same as over the real numbers.) Algebraic geometry also lets me know the motivation behind the otherwise peculiar $\tan(t/2)$-substitution in calculus, which turns integrals of rational functions of $\sin x$ and $\cos x$ into integrals of rational functions.