@minipage switch is used by LaTeX to handle vertical spacing at the beginning of a minipage environment (or a similar construct). If it is true then
\addvspace is not adding space. So if, for example, a minipage starts of with a list environment then the space normally added in front of the list (by
\addvspace) is suppressed.
The switch will be set to true at the beginning of a minipage environment (or a similar construct) and is normally set to false by
\everypar, i.e., the moment textual material appears in that "minipage".
Now in the case of the caption implementation, two different strategies are used: if the caption is wider than the current horizontal width, then it is re-set as a normal paragraph (so the switch would be set to false by
\everypar). However is it is small then the box is used directly without triggering the paragraph builder. Therefore one has to set the switch manually in this case.
And the reason that it is done globally is just because the switch is always manipulated globally.