Why divide the t-test p-value by 2 in the SPSS output? In SPSS, the output of a t-test is always  for a 2-sided hypothesis. I know that if we are checking a 1-sided hypothesis, We need to divide the p value in the output by 2. However, it is not clear the theoretical/statistical reason for this. Can someone explain?

You cannot just divide the p-value from a 2-sided hypothesis by 2 to get a p-value from a 1-sided hypothesis. You must first check which side of the t distribution your test statistic falls on and whether that is consistent with or not consistent with your null hypothesis.
A t-test will use a test statistic (we’ll call it x). Under the null hypothesis, x will follow a t distribution with a probability mass centered around 0.
When you generate a 2-sided p-value for a t statistic x, you add the probability mass of the t distribution in the region that is greater than |x| (absolute value of x) and that is less than -|x|. Because the t distribution is symmetric around zero, this is equivalent to twice the mass greater than |x| or twice the mass less than -|x|.
When you conduct a 1-sided test, you only care about either a case when x > 0, or when x < 0, but not both. So, if your alternative hypotheses is that x > 0, and x is a positive number, you only care about the probability mass in the region of the t distribution greater than x. However, you do not double this as you did with the 2-sided test because you do not care about the mass less than -x. So, in this case, the p-value from your 1-sides test would be half the p-value from your 2-sided test.
If this doesn’t make sense, check out this blog post.
https://statisticsbyjim.com/hypothesis-testing/one-tailed-two-tailed-hypothesis-tests/
