The obvious answer is that this approach takes a nice simple trigonometric integral and replaces it by something involving complex logarithms, which are difficult beasts to tame.

A complex analysis book would be a good investment.

The reason things look wrong here is that when you make the substitution , as x goes from 0 to ∞, t goes from –1 to 1. But it does not go from –1 to 1 along the real axis, it goes (anticlockwise) round the unit circle in the complex plane. The integral of 1/t is log(t), and the values of log(t) at –1 and 1 are and . Taking the integral along that contour, you get the result , which is what you would expect from .