You are missing a \relax here: \ifdim is expandable, and so \hskip will keep expanding looking for a plus. Now, it does not find one but the test result has already been decided (true) before the \hskip takes place. In the second line, \showthe is not expandable, so \hskip stops and inserts the skip before \showthe is executed.
As Hendrik point's out in a comment, TeX will expand looking for an optional space for any dimension. Thus something like
\newskip\mydim
\mydim4pt\ifdim\mydim=4pt\else \ARG\fi
\showthe\mydim
\bye
gives a different result to
\newskip\mydim
\mydim4pt \ifdim\mydim=4pt\else \ARG\fi
\showthe\mydim
\bye
as in the later case the space terminates the assignment before the \ifdim test.
However, \hskip is a skip (rubber length), not a dimension. It therefore has optional stretch and shrink components in addition to the fixed length. So modifying the original code to
\noindent\hskip1pt \ifdim\lastskip=0pt lastskip was 0pt\fi\par
\noindent\hskip1pt \showthe\lastskip
\bye
does not change the outcome. TeX finds the optional space for 1pt but continues to expand looking for plus or minus. So the assignment can only take place on the first line when it hits the l, by which time the \ifdim result has already been determined.