With slightly different indentation the code reads
\makeatletter
\def\thebibliography#1{%
\chapter*{References\@mkboth{REFERENCES}{REFERENCES}}%
\list
{[\arabic{enumi}]}
{\settowidth\labelwidth{[#1]}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\usecounter{enumi}}%
\def\newblock{\hskip .11em plus .33em minus .07em}%
\sloppy
\clubpenalty4000
\widowpenalty4000
\sfcode`\.=1000\relax}
\makeatother
It modifies the command \thebibliography that forms the basis of the begin code of
\begin{thebibliography}{<longest label>}
\bibitem{<key>} <entry text>
\end{thebibliography}
In detail
\chapter*{References\@mkboth{REFERENCES}{REFERENCES}}%
First the code typesets an unnumbered chapter References and adds running heads on both sides reading REFERENCES.
\list
{[\arabic{enumi}]}
The bibliography is typeset as a list using the counter enumi (a bit unusual, the standard implementations use the counter enumiv, but normally that does not matter). The label number/label is wrapped in square brackets
{\settowidth\labelwidth{[#1]}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\usecounter{enumi}}%
This is standard stuff that sets up a list with sensible margins for this scenario.
\def\newblock{\hskip .11em plus .33em minus .07em}%
Defines the additional stretchable space that \newblock inserts. \newblock is a command issued by many bibliography styles to separate larger blocks of information in the bibliography. It allows for visual separation and can help improve line breaking with its additional stretchiness.
\sloppy
Sets parameters for line breaking, see What is the meaning of \fussy, \sloppy, \emergencystretch, \tolerance, \hbadness?. This setting is usually good at avoiding overfull, but could give sub-par result for longer paragraphs of text. For the bibliography that is probably acceptable.
\clubpenalty4000
\widowpenalty4000
Sets parameters to control widows and orphans. See How do I prevent widow/orphan lines? and https://texfaq.org/FAQ-widows.
\sfcode`\.=1000\relax
Disable the larger space after sentence-ending .s in the bibliography. See also Double space between sentences.
Compared to the standard definition in report.cls (it's the same in book.cls and only slightly different in article.cls)
\newenvironment{thebibliography}[1]
{\chapter*{\bibname}%
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
we note the following differences:
- Your code only redefines the begin code (presumably the end code is left unchanged).
- Your code uses
enumi instead of enumiv. In practice that difference should hardly matter.
- The standard code has customisable macros in some places where your code has hard-coded values (
[...] vs \@biblabel{...}; References vs \bibname; ).
- In particular the standard classes would print
\bibname, which defaults to Bibliography, while your code has References hard-coded. This is about the only visible difference between your code and the standard definition for 'normal use' (assuming the standard definition of \def\@biblabel#1{[#1]}, which is hard-coded in your definition).
- Since your code redefines
\newblock in the begin code, all changes that are made to that command in the document will be void.
FWIW I found http://kb.mit.edu/confluence/x/YJ47 which recommends pretty much the code you showed. Alan Hoenig's TeX Unbound: LaTeX & TeX Strategies for Fonts, Graphics, & More shows a similar definition on p. 546. The definition is quite similar in style to the one in apalike.sty. I also found several LaTeX 2.09 .stys with similar idioms using enumi (http://mirrors.ctan.org/macros/latex209/contrib/misc/chapref.sty, http://mirrors.ctan.org/macros/latex209/contrib/misc/cites.sty). Maybe the code is inspired by older LaTeX 2.09 code?
\endthebibliography? – Mico Mar 06 '19 at 20:55biblatex, not writing directly\bibtems in thethebibliographyenvironment (5) Remember the KISS principle. – Fran Mar 06 '19 at 22:06\bibnameto read "References", this could be done as in https://tex.stackexchange.com/q/82993/35864). That need not mean that the entire template is bad and should be avoided. But given the extensive contact many users here have had with bad templates it is good to be on guard. – moewe Mar 07 '19 at 10:19