I guess it's the same reason why \begin{tikzpicture}[yshift=-5pt]
wouldn't move a tikzpicture
down. The option is applied to the content of the tikzpicture
in the coordinate system of the diagram, but it doesn't affect the position of the tikzpicture
on the baseline/page.
On the other hand, foo\raisebox{5pt}{\tikzmark{Z0}}\tikzmark{Z1}bar \tikz[overlay,remember picture] \draw[orange] (pic cs:Z0) -- (pic cs:Z1);
works, because the \raisebox
moves the tikzmark
itself on the page, like it would the letter x
for example.
Putting a \raisebox
in the \noalign
didn't work, but a slightly roundabout way could be to do this:

\documentclass{article}
\usepackage{tikz,array}
\usetikzlibrary{tikzmark}
\begin{document}
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{|c|}\noalign{\tikzmark{top}}\hline
\raisebox{5pt}{\tikzmark{baseline}}foo
\end{tabular}
\begin{tikzpicture}[overlay,remember picture]
% if you want to use the same coordinate multiple times
% it makes sense to define a named \coordinate
\coordinate (foo) at ({pic cs:top} |- {pic cs:baseline});
\fill[orange] (foo) circle[radius=.5pt];
\end{tikzpicture}
% foo can of course be used in other tikzpictures as well
\tikz[remember picture,overlay]
\draw [->] (foo) -- ++(1cm,1cm);
\end{document}