The main reason, I believe, is inertia. The author learned how to produce \gsim
in that (hilarious) way thirty or more years ago or borrowed it from some template whose origin dates from the early times of LaTeX. The amssymb
package is in its current form essentially since 1994, but the symbols had already been available for several years, even for plain TeX (or AMS-TeX).
The macro \shortstack
was conceived for picture
mode, but is not really useful for any real application, as far as I can tell.
A definition like the one you show is wrong under many respects:
- the spacing is not the same as for relation symbols;
- it doesn't change size in subscripts/superscripts;
- the -0.07cm vertical adjustment is computed “by eye” and doesn't scale with the main font size.
Here's a visual comparison:
\documentclass{article}
\usepackage{amssymb}
\newcommand{\gsim}{\raisebox{-0.13cm}{~\shortstack{$>$ \\[-0.07cm]
$\sim$}}~}
\begin{document}
$a\gtrsim b_{\gtrsim}$
$a\gsim b_{\gsim}$
\end{document}

The output of \gsim
(second line) seems not so bad, but the spacing is odd and the subscript is clearly wrong.
A slightly better result can be obtained with some more work:
\documentclass{article}
\usepackage{amssymb}
\makeatletter
\newcommand{\undersim}[1]{\mathrel{\mathpalette\@undersim{#1}}}
\newcommand{\@undersim}[2]{%
\vcenter{%
\ialign{%
##\cr
$\m@th#1#2$\cr
\noalign{\nointerlineskip\kern.2ex}
$\m@th#1\sim$\cr
\noalign{\kern-.4ex}
}%
}%
}
\newcommand{\gsim}{\undersim{>}}
\newcommand{\lsim}{\undersim{<}}
\makeatother
\begin{document}
$a\gtrsim b_{\gtrsim}$
$a\gsim b_{\gsim}$
\end{document}

However, such tricks should only be used for symbols that are not available as already precomposed ones (or if in tight situations with too many math fonts).
In your case, don't be afraid to remove the silly definitions and change them into
\newcommand{\gsim}{\gtrsim}
\newcommand{\lsim}{\lesssim}
along with \usepackage{amssymb}
.
\shortstack
is a rarely used LaTeX command, but existing from day one. It predatesamssymb
and inertia wins.amssymb
.\gtrsim
and\lesssim
layout could be unsatisfactory for some authors.