[Tex/LaTex] Why is `\strut` working in these scenarios

boxeshorizontal alignmentspacingstrut

\strut seems to be a powerful command to get the interlinear spacing correct; particularly, when working with text in \parboxs or minipages. But it's also nice in contexts in which LaTeX is setting the text in an unexpected place.

Here's a MWE which illustrates two situations in which \strut is the quick and easy method to get the interlinear or textual alignment correct.

\documentclass{article}
\usepackage[width=7.5in]{geometry}
\usepackage{lipsum}
\pagestyle{empty}
\begin{document}

\noindent
\begin{minipage}[t]{3in}
  \hspace*{\fill}Naive Approach\hspace*{\fill}

  \vspace{1cm}

  \noindent
  \begin{tabular}{ll}
    first  & short text                                                         \\
    second & \parbox[t]{2.25in}{By putting a long line here I get bad spacing.} \\
    third  & short text                                                         \\
    fourth & spacing                                                            \\
    fifth  & short text                                                         \\
  \end{tabular}

  \vspace{1cm}

  \leavevmode\vadjust{
    \noindent
    \raisebox{\dimexpr0.5\totalheight\relax}[0pt][0pt]{\makebox[0pt][r]{Hello}}
  }%
  \lipsum[1]

  \vspace{1cm}

  On this side of things, the placement of \verb-Hello- just isn't easily
  gotten correct whether I substitute 

  \vspace{0.5cm}

  \centering
  \verb|\dimexpr0.5\totalheight\relax| 

  by
  \verb|\depth| or just plain \verb|0pt|.

  \vspace{0.5cm}

  \textbf{Note:} if I replace \verb-Hello- by \verb-Why- and then raise
  the box by \verb-\depth- then things appear to be visually aligned correctly.

\end{minipage}\hspace*{\fill}%
\begin{minipage}[t]{3in}
  \hspace*{\fill}Better spacing with \verb=\strut=\hspace*{\fill}

  \vspace{1cm}

  \noindent
  \begin{tabular}{ll}
    first  & short text                                                               \\
    second & \parbox[t]{2.25in}{By putting a long line here I get bad spacing.\strut} \\ 
    third  & short text                                                               \\
    fourth & spacing                                                                  \\
    fifth  & short text                                                               \\
  \end{tabular}

  \vspace{1cm}

  \leavevmode\strut\vadjust{
    \noindent
    \raisebox{\dp\strutbox}[0pt][0pt]{\makebox[0pt][r]{Hello}}
  }%
  \lipsum[1]


\end{minipage}

\end{document}

enter image description here

I've seen the answers posted at What's the difference between \strut, \mathstrut and \vphantom? and Spacing between items containing a parbox. They're helpful in understanding when to use \strut. I've looked at how \strut is defined. But I'm still in the dark about how \strut actually accomplishes what it does.

Could someone take the time to explain how it is that using \strut achieves the correct effect? Or point me in the right direction?

NOTE
I've also seen this explanation but other than restating the definition, I'm still unclear about why it's working in the situations I've provided above.

UPDATE

After considering the example @Werner provided using \fboxs to show the depth created by \strut, I decided I should try something similar to illustrate my situation involving \vstrut. Unfortunately, it wasn't as simple as just placing my example into an \fbox. Basically the content disappears.
But I prevailed. In the following MWE I test out three different scenarios with three cases each.

\documentclass{article}

\newcommand{\aestrut}{\raisebox{0pt}[0pt][0pt]{\rule[\dimexpr-0.3\baselineskip\relax]{0.4pt}{\dimexpr\baselineskip\relax}}}
\newcommand{\visibleStrutAndBaseline}{\aestrut\rule[-0.4pt]{1cm}{0.4pt} Followed by text}
\newcommand{\aehline}{\rule[-0.4pt]{1cm}{0.4pt}}

\newcommand{\aecontent}[1]{\aehline\hspace{\dimexpr-1cm+0.25em}#1}

\setlength{\parindent}{0pt}
\pagestyle{empty}
\begin{document}

  \visibleStrutAndBaseline --- using No strut
  {\leavevmode\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Text}}}}

  \vspace{0.25cm}

  \visibleStrutAndBaseline --- using Strut but not raised
  {\leavevmode\strut\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Text}}}}

  \vspace{0.25cm}

  \visibleStrutAndBaseline --- using Strut and raised by depth of strut
  {\leavevmode\strut\vadjust{\raisebox{\dp\strutbox}[0pt][0pt]{\aecontent{Text}}}}


  %%--------------------------------------------------------------------------------

  \vspace{1cm}

  \visibleStrutAndBaseline --- using No strut
  {\leavevmode\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Ziggy}}}}

  \vspace{0.25cm}

  \visibleStrutAndBaseline --- using Strut but not raised
  {\leavevmode\strut\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Ziggy}}}}

  \vspace{0.25cm}

  \visibleStrutAndBaseline --- using Strut and raised by depth of strut
  {\leavevmode\strut\vadjust{\raisebox{\dp\strutbox}[0pt][0pt]{\aecontent{Ziggy}}}}

  %%--------------------------------------------------------------------------------

  \vspace{1cm}

  \visibleStrutAndBaseline\rule[-2ex]{2pt}{3ex} --- using No strut
  {\leavevmode\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Deep}}}}

  \vspace{0.25cm}

  \visibleStrutAndBaseline\rule[-2ex]{2pt}{3ex} --- using Strut but not raised
  {\leavevmode\strut\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Deep}}}}

  \vspace{0.25cm}

  \visibleStrutAndBaseline\rule[-2ex]{2pt}{3ex} --- using Strut and raised by depth of strut
  {\leavevmode\strut\vadjust{\raisebox{\dp\strutbox}[0pt][0pt]{\aecontent{Deep}}}}

\end{document}

The scenarios involve the depth of the main line of text and the depth of the text in the \vadjust. So, in scenario one the depth of the \vadjust content is zero. In scenario two there is a nontrivial depth for this content. In the third scenario I've created a deep depth.

For each scenario there are three cases:
The case one is to consider what happens when \strut is not used. Case two is to use \strut but not raise the contents of the \vadjust. And the third case illustrates raising the content by the depth of \strut.

In all scenarios and cases I use a visible strut to mimic \strut, which I've set to zero height and depth so as not to inadvertently disturb the vertical spacing.

enter image description here

This example helped me see two things: first was where exactly \vadjust is placing the text: Sure enough, others have been saying it's placed between the lines. And that is certainly true. Per correction by @DavidCarlisle : it seems to be placed so that the TOP of the \vadjust's content is aligned with the BOTTOM (not the baseline) of the box for the line from within which \vadjust was called.
The second things I was able to see was that, as long as the main text does not have any boxes with wild depths, then \strut will be sufficiently deep to affect the correct depth to get the desired alignment.

Best Answer

From the comments on the on the other answers, it seems like you want to concentrate on

 \leavevmode\strut\vadjust{%
    \noindent
    \raisebox{\dp\strutbox}[0pt][0pt]{\makebox[0pt][r]{Hello}}
  }%

The first \leavevmode isn't really needed as \strut is defined to get into horizontal mode, however it does no harm and makes it clearer that the code needs horizontal mode. Then comes the \strut this is important and we'll come back to that. Then \vadjust: the content of \vadjust is evaluated immediately (like \vbox) but the resulting vertical material is not boxed but inserted into the vertical list that will be later constructed from the lines in the paragraph.

The intention of the code is to make hello aligned to the baseline of the previous box, but the vadjust material is inserted directly into the list not forced to baseline spacing so to align to the baseline of the previous box you need to back up by the depth of the previous box. the "previous box" has not yet been constructed, it consists of whatever text ends on the line that has the vadjust node If that line had arbitrary text its depth would not be known. However as \strut was added and this had bigger depth than any letter or other normal text it is reasonable to assume the depth of the line is the depth of strutbox.

So \raisebox{\dp\strutbox} gets you back to the baseline of the previous line.

This will fail if you put some deep inline math or an inline tabular in the line, but if you need to deal with that you need a more complicated two pass measuring scheme.