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?

We see $p$ values for two-sided tests represented like $p_{1} = P(|T_{\nu}| > |t|)$, but also see them represented like $p_{2} = P(T_{\nu} > |t|)$.
$$P(|T_{\nu}| > |t|) = 2\times P(T_{\nu} > |t|)\text{, so }p_1 = 2p_2.$$
For a given type I error rate $\alpha$, the rejection decision is:
$$\text{Reject if }p_1 \le \alpha$$
which is mathematically equivalent to
$$\text{Reject if }p_2 \le \frac{\alpha}{2}$$.
"Mathematically equivalent" means rejection decisions are always identical:
$$\begin{align*}\text{Reject if }p_1 & \le \alpha\\\\
\text{Reject if }2p_2 & \le \alpha \text{ (substituting $2p_2$ for $p_1$)}\\\\
\text{Reject if }p_2 & \le \frac{\alpha}{2}\text{ (dividing both sides by 2)}\end{align*}$$
