The second column of a starred cases*-like environment defined by mathtools is in text mode and not in math mode (as the unstarred cases ones are). See ยง3.4.3 More cases -like environments, pp. 18-19 of the mathtools documentation.
That means that
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
(-1)^n&=
\begin{cases*}
-1,& if $n$ is odd \\
1,& otherwise
\end{cases*}\\
&=
\begin{cases}
-1,& n \in \{\dots, -3, -1, 1, 3, \dots\} \\
1,& n \in \{\dots -4, -2, 0, 2, 4, \dots\}
\end{cases}
\end{align}
\end{document}
displays as

With the second column of the first cases* in text mode (no command is needed to make sure the text is typeset as text and not math) and the second column of cases in math mode (no error from \in and friends).
The difference is clear also in
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
(-1)^n&=
\begin{cases*}
-1,& if $n$ is odd \\
1,& otherwise
\end{cases*}\\
&=
% don't do this!
\begin{cases}
-1,& if $n$ is odd \\
1,& otherwise
\end{cases}
\end{align}
\end{document}

<x>cases*environments the second column is a text column and not a math column. Either use the unstarredrcasesif you want the second column to be in math mode or switch to math mode with$...$โ moewe Aug 30 '18 at 10:04fooandbarbazare totally benign in text mode and won't raise an error. You can clearly see that they are in text mode though, when you look at the output: They are written in upright and not in math italics. โ moewe Aug 30 '18 at 10:09