Interesting observation! Unfortunately, this seems to be a coincidence.
The original, algebraically motivated definition of the Hecke algebra gives the quadratic relation as
$$(T-q)(T+1)=0.$$
For $SL_2$, the Hecke algebra has a faithful two dimensional representation. The eigenvalues of $T$ are $q$ and $-1$, and the quadratic relation simply becomes the Cayley--Hamilton theorem.
But any 2x2 matrix $A$ also satisfies its characteristic equation
$$(A-\lambda_1)(A-\lambda_2)=0,$$
where $\lambda_1,\lambda_2$ are the eigenvalues of $A$. If $A$ is nonsingular, then the rescaling
$A\mapsto \sqrt{\lambda_1\lambda_2}A$ transforms this into
$$(A-a)(A-a^{-1})=0,$$
where $a=\sqrt{\frac{\lambda_1}{\lambda_2}}$.
Thus your observation reduces to the fact that $i$ is a "nice" value of $\sqrt{\lambda_1\lambda_2}$ for the Hecke algebra. But in fact the niceness here is rather circular. As mentioned above, the more motivated definition of the Hecke algebra is not symmetric. To reach the modern presentation, we symmetrize the definition by replacing $T\mapsto q^{1/2} T$ to find (with $t=q^{1/2}$)
$$(T-t)(T+t^{-1}) =0. $$
The goal of this rescaling is to make this relation "nice", i.e. transforming nicely under $t\mapsto t^{-1}$. We could have alternatively rescaled $T\mapsto iq^{1/2}$ to get
$$(T-t)(T-t^{-1})=0. $$
These are the only two rescalings if we want the relation to be nice. Thus a priori the only possible values of $\sqrt{\lambda_1\lambda_2}$ for a nice Hecke algebra presentation are $1$ or $i$, explaining your observation. (We pick the $i$ presentation over the $1$ presentation to preserve the behavior of the Hecke algebra as $t\rightarrow 1$.)
Thus the fundamental reason for the similarity between the Hecke algebra presentation and the trace relation in $SL_2$ is that the Hecke algebra is two dimensional. But the dimension of the Hecke algebra is the size of the Weyl group $S_2$. The fact that $|S_2|=2=\mathrm{rank}(SL_2)$ is a coincidence.