It depends on what you're keeping track of. Typically we keep track of the angular displacement of the pendulum. In this case it's better to think about the torque acting on the pendulum about the point of rotation. Therefore, the tension force doesn't play a role in restoring the angular displacement to $0$ because it has no torque about the point of rotation. In other words, we have
However, if you are just interested in the horizontal position of the pendulum, then the tension force does matter. Splitting the forces up into horizontal and vertical components we have
The tension force is the only force that has a horizontal component. Of course, this is more complicated than the above case, so you don't usually see this system analyzed in this way.
A mix between these two cases is to consider forces along the path and perpendicular to the path. Then we have
And I think this gets at the heart of what the tension force's role is. It's serves to constrain the motion of the pendulum to maintain its circular path. i.e. since the radius of the circle is not changing, it must be that $F_r=-mr\omega^2$, so the tension keeps the motion circular by bring equal to $mg\cos\theta+mr\omega^2$. Also, note that we get back to the first case by using the fact that $\tau=F_\theta r$.
In any case, as you can see there are multiple ways to look at the system. None of the ways are wrong, but some are more useful than others. It's hard to really say what any of the forces' role is in terms of restoring to equilibrium. Sure, gravity is the only force that has a component along the direction of motion, but the tension force is just as important to the overall motion of the pendulum.