In calculating the integral
$$\int_{-\infty}^{\infty} \frac{\sin x}{x}dx$$
by contour integration, we use
$$\int_{-\infty}^{\infty} \frac{\sin x}{x}dx = \int_{-\infty}^{\infty} \frac{\operatorname{Im}(e^{ix})}{x}dx =\operatorname{Im}\left(\int_{-\infty}^{\infty} \frac{e^{ix}}{x}dx \right)$$
but in the process, we have gone from an integral which is well-defined with no real singularities to one with a real singularity which in fact is just undefined as an improper integral. Therefore, in the source I am reading, we take the cauchy principal value (CPV) of the integral on the RHS instead of treating it as an improper integral. This principal value is calculated by use of the Residue Theorem.
My question: There are different ways to treat singularities in integrals. How do we know that this one (the CPV) will give us the correct result for $\int_{-\infty}^{\infty} \frac{\sin x}{x}dx$? Of course, knowing the answer by other methods, we can compare and see it was correct, but I'm looking to understand why the reasoning is valid.
Response to 1st answer: Simply saying that the integral converges is not enough. We need some way to know that in particular the CPV is the correct notion of integration for the exponential integral. Clearly, not any notion of integration which converges must give the correct result.
Response to 2nd answer: The question I ask is: by what reasoning is the notion of CPV in $\int_{-\infty}^{\infty} \frac{\sin x}{x}dx =\operatorname{Im}\left(CPV\int_{-\infty}^{\infty} \frac{e^{ix}}{x}dx \right)$ justified. Of course the first integral is the same as an improper integral or CPV, this just doesn't answer the question.

Why the Cauchy Principal Value Gives the Proper Value
Your question boils down to the following $$ \begin{align} &\mathrm{Im}\left(\mathrm{PV}\int_{-\infty}^\infty\frac{e^{ix}}x\,\mathrm{d}x\right)\\ &=\mathrm{Im}\left(\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(x)}x\,\mathrm{d}x+i\,\mathrm{PV}\int_{-\infty}^\infty\frac{\sin(x)}x\,\mathrm{d}x\right)\tag{1a}\\ &=\mathrm{Im}\left(\lim_{\epsilon\to0}\int_{|x|\gt\epsilon}\frac{\cos(x)}x\,\mathrm{d}x+i\int_{-\infty}^\infty\frac{\sin(x)}x\,\mathrm{d}x\right)\tag{1b}\\ &=\mathrm{Im}\left(0+i\int_{-\infty}^\infty\frac{\sin(x)}x\,\mathrm{d}x\right)\tag{1c}\\ &=\int_{-\infty}^\infty\frac{\sin(x)}x\,\mathrm{d}x\tag{1d} \end{align} $$ Explanation:
$\text{(1a)}$: $e^{ix}=\cos(x)+i\sin(x)$ and $\mathrm{PV}$ is linear
$\text{(1b)}$: definition of $\mathrm{PV}$ on the cosine integral
$\phantom{\text{(1b):}}$ $\mathrm{PV}$ of a convergent integral is that integral
$\text{(1c)}$: the integral of an odd function over a domain
$\phantom{\text{(1c):}}$ symmetric about the origin is $0$
$\text{(1d)}$: take the imaginary part
Actually, it doesn't even matter what the Principal Value of the cosine integral is. As long as it exists and is real, it is eliminated by taking the imaginary part.
Avoid Singularities Altogether
There is no singularity whatsoever in $$ \int_{-\infty}^\infty\frac{\sin(x)}x\,\mathrm{d}x\tag2 $$ The way to compute this integral and never come close to a singularity is to note that $$ \lim_{R\to\infty}\int_{\gamma_R}\frac{\sin(z)}z\,\mathrm{d}z=0\tag3 $$ where $\gamma_R=[-R,R]\cup[R,R-i]\cup[R-i,-R-i]\cup[-R-i,-R]$. This is because there are no singularities inside this contour for any $R$.
Furthermore, the integral vanishes on $[R,R-i]$ and $[-R-i,-R]$ as $R\to\infty$ since $|\sin(z)|\le\cosh(1)$ and $|z|\ge R$ and the length of each path is $1$. Thus, the integral over both paths is no bigger than $\frac{2\cosh(1)}R$.
Discounting the integrals which vanish, $(3)$ becomes $$ \int_{-\infty}^\infty\frac{\sin(x)}x\,\mathrm{d}x=\int_{-\infty-i}^{\infty-i}\frac{\sin(z)}z\,\mathrm{d}z\tag4 $$ The path of integration on the right side of $(4)$ passes nowhere near a singularity. Use $\sin(z)=\frac{e^{iz}-e^{-iz}}{2i}$ to evaluate the right side of $(4)$: $$ \begin{align} \int_{-\infty-i}^{\infty-i}\frac{\sin(z)}z\,\mathrm{d}z &=\frac1{2i}\int_{-\infty-i}^{\infty-i}\frac{e^{iz}}z\,\mathrm{d}z-\frac1{2i}\int_{-\infty-i}^{\infty-i}\frac{e^{-iz}}z\tag{5a}\\ &=\frac1{2i}\lim_{R\to\infty}\int_{\gamma_R^+}\frac{e^{iz}}z\,\mathrm{d}z-\frac1{2i}\lim_{R\to\infty}\int_{\gamma_R^-}\frac{e^{-iz}}z\tag{5b} \end{align} $$ where $\gamma_R^+=[-R-i,R-i]\cup Re^{i[0,\pi]}-i$ and $\gamma_R^-=[-R-i,R-i]\cup Re^{i[0,-\pi]}-i$. $\text{(5b)}$ follows because the integrals along the huge arcs go to $0$; $e^{iz}$ vanishes exponentially in the upper half-plane and $e^{-iz}$ vanishes exponentially in the lower half-plane. In fact, the integrals along those arcs are bounded by $$ \begin{align} \int_0^\pi\overbrace{e^{-R\sin(\theta)+1}\vphantom{\frac RR}}^{\large e^{\pm iz}}\overbrace{\ \frac{R\,\mathrm{d}\theta}{R-1}\ }^{\mathrm{d}z/z} &\le\frac{2eR}{R-1}\int_0^{\pi/2}e^{-2R\theta/\pi}\,\mathrm{d}\theta\tag{6a}\\ &\le\frac{2eR}{R-1}\frac\pi{2R}\tag{6b}\\[3pt] &=\frac{e\pi}{R-1}\tag{6c} \end{align} $$ Since $\gamma_R^-$ contains no singularities, the integral on the right-hand side of $\text{(5b)}$ is $0$. Since $\gamma_R^+$ contains the singularity at $0$, whose residue is $1$, we get that the integral on the left-hand side of $\text{(5b)}$ is $2\pi i$.
Putting together $(2)-(5)$, we conclude $$ \int_{-\infty}^\infty\frac{\sin(x)}x\,\mathrm{d}x=\pi\tag7 $$