When I compile a LaTeX document (whether the class is book or report) whose table of contents has a lot of chapters and/or sections, the second page looks like it is indented.

Working example:

\documentclass{book}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{graphicx}
\usepackage{bm}
\usepackage{siunitx}
\begin{document}
\tableofcontents
\setcounter{tocdepth}{1}
\chapter{Introduction}
\section{a}a
\\
\\
\section{b}b
\\
\\
\section{c}c
\\
\\
\section{d}d
\\
\\
\section{e}e
\\
\\
\section{f}f
\\
\\
\section{g}g
\\
\\
\section{h}h
\\
\\
\section{i}i
\\
\\
\chapter{Another chapter}
\section{aa}aa
\\
\\
\section{ab}ab
\\
\\
\section{ac}ac
\\
\\
\\
\\
\section{ae}ae
\\
\\
\section{af}af
\\
\\
\section{ag}ag
\\
\\
\section{ah}ah.
\\
\\
\section{ai}ai.
\\
\\
\section{aj}aj
\\
\\
\section{ak}ak
\\
\\
\section{al}al
\\
\\
\section{am}am
\\
\\
\end{document}


How can I avoid this?

I'm using TeXstudio, if that helps.

There's no indention for the second page, as you could check loading showframe. It happens that, for two-sided printing, in good typography, inner margin (left side on oddpages, right side on even pages) is about half the width of outer margin, for obvious reasons.
With showframe, you can check the table of contents is flushleft on odd and even pages. If you want not to have this ‘indention’, change the margins.
• Or change the first line of your code to \documentclass[oneside]{book} Aug 31 '16 at 11:04