Use a variable as a coordinate in pgfplots

I have the following code:

\begin{tikzpicture}
\begin{axis}[domain=0:40]
\def\a{\pgfmathparse{1+1}\pgfmathresult}
%\draw (\a,20)--(axis cs:20,0);
\node at (axis cs:30,30) {\a};
\end{axis}
\end{tikzpicture}

The node gives me the correct output, while the draw command won't work as expected. Why? (Uncommenting \draw breaks the code.)

-