Class ltxdoc is a LaTeX class for typesetting the documentation in .dtx files. The class loads package doc that does most of the work including the definition of environment verbatim. In .dtx files the documentation lines usually starts with % to get ignored, when docstrip extracts the code. Instead of
\begin{verbatim}
% why is my percent sign gone?
\relax % not here
\end{verbatim}
the common use case is rather:
%\begin{verbatim}
%verbatim stuff that should be set without the
%percent signs at the start of the lines.
%\end{verbatim}
Therefore package doc modifies verbatim to ignore the percent sign at the start of a line. This is done by macro \check@percent that can be redefined locally:
\begingroup
\makeatletter
\let\check@percent\relax
\begin{verbatim}
% percent sign
\relax % and here
\end{verbatim}
\endgroup
%(including verbatim sections). – David Carlisle Dec 19 '12 at 17:38%and this is why I only now realized the gobbling up of%signs at the beginning of lines. Doubling it%%leaves a survivor, which is fine for me. – jfbu Dec 19 '12 at 18:07