In the following example, the main paragraph gets typeset as 3 lines of text, with the paragraph ending on the third line before it reaches the margin. However, when un-commenting the line with the \marginpar command, the paragraph is reformatted so that the third line extends all the way to the margin, and a blank fourth line is inserted. What is the \marginpar inserting into the main text that doesn't "fit" into the third line, and why?
\documentclass{amsart}
\begin{document}
\noindent
Suppose furthermore that abcde is a regular cardinal such thati abcdefghiji
The collection abcdefg is called a
nice collection of elementary submodels of $H(\theta)$ indexed by $T$ if,
in addition to being a nice collection of sets as above, we have: Bake
%\marginpar{Bake a cake.}
Next paragraph.
\end{document}
(Note: The \noindent and the choice of document class are probably not essential to the problem, but I couldn't quite get the spacing right when trying to reproduce the problem without them.)
I realize that the practical workaround is to remove the inter-word space before the \marginpar command. However, it is not clear to me why this should be necessary. Furthermore, I discovered this problem when using the \todo command of the todonotes package, which relies on \marginpar. It seems that \todo intentionally gobbles the space following its argument, meaning that it is designed so that one should (in general) leave a space before it, but this case then becomes an exception.