Ambidentate Behaviour: Elimination vs Substitution 1
According to Pearsons hard soft [Lewis] acid base principle, hard Lewis acids have a strong affinity for hard Lewis bases and soft Lewis acids have a strong affinity for soft Lewis bases.

Hard alkoxide ion preferentially abstracts a hard proton, so initiating E2 elimination, whereas soft nucleophilic thiophenoxide ion preferentially displaces soft(ish) chloride nucleofuge.

Note that while hard vs soft comparisons can be made for carefully selected pairs of species and/or reactive centres, the HSAB analysis is NOT general. For more information look in the Chemogenesis webbook section on Pearson's HSAB principle.