This has to do with the (approximate) distribution of the test statistic under the null hypothesis. This distribution, together with the value of the test statistic, is used to compute the p-value, which is all the user of the test needs eventually.

If the (approximate) distribution of the test statistic under the null hypothesis is a t-distribution (with a certain degree of freedom), then the test statistic is called a T score; on the other hand, if it is standard normal, then the test statistics is called a Z Score.

In the end, this information can be considered "nice to have" but it does not have any practical bearing. All that matters to the user is the p-value. How it was obtained is of interest to the statistician, to the user, it is "under the hood" stuff.