You can't let \left and \right span an alignment & naturally. You need to break them using a \left-\right. and \left.-\right pair, together with the optional \vphantoms to have similar vertical heights (as described in Left/Right across multi-line equation).
However, your problem is solved using either cases or dcases, depending on which you prefer:

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
r = \begin{cases}
a_p & \text{if } \sum_{p = 1}^L a_p > \sum_{q = 1}^s a_q \\
a_q & \text{if } \sum_{p = 1}^L a_p < \sum_{q = 1}^s a_q
\end{cases}
\]
\[
r = \begin{dcases}
a_p & \text{if } \sum_{p = 1}^L a_p > \sum_{q = 1}^s a_q \\
a_q & \text{if } \sum_{p = 1}^L a_p < \sum_{q = 1}^s a_q
\end{dcases}
\]
\end{document}
\right.to match the opening\left\{. Also, you should consider usingcasesenvironment. Oh, just noticed that you probably want to use\text{ if }(space beforeif) instead of\text{if }. – Peter Grill Sep 11 '18 at 20:14