why choose t distribution when variance known?

Sample was drawn from a normal distribution, the mean was 3$, standard deviation was 1$, sample consist of 25 observations. Null hypothesis is mean equal 2.1$ What appropriate test statistics to use? I choose z distribution because variance is known. But schwesr study material choose t distribution, why?

if observations are less than 30 do t-dist…

When n < 30 use always the t-distribution. As t-distribution approaches the normal distribution as n gets larger you can go with the normal distribution if you have a variance.