The Anderson-Darling test is a test for a fully specified distribution.
If you use it as a test for normality (without a prespecified mean and variance), the estimated distribution will nearly always be closer to the data than the true distribution, so tabulated critical values will be too large, resulting in a lower than nominal significance level and lowered power.
The correct distribution of the test statistic under the null needs to take account of this estimation.
This is similar to the relationship between the Kolmogorov-Smirnov and Lilliefors test.
In the case of the A-D, this can be done approximately by an adjustment, as discussed for example in the book by D'Agostino and Stephens.
The comments in the code you link to not only explicitly discuss this issue -- they also mention the same reference.