I came across the following expression in the context of randomized trials.
The textbook states that we can use the law of iterated expectations to express the probability density function of $Y$ for the treatment group ($i \text{ such that } T_i = 1$) as: $$f(y|T = 1) = \int_x f(y,x|T = 1) dx$$
I am confused because $f(y|T=1)$ is not an Expected Value. How is the LIE relevant here?
It is not, quite.
This is the Law of Total Probability.
A marginal probability density function is the integral of the joint density function with respect to the covariable.
$$f_Y(y) = \int_\chi f_{Y,X}(y, x)\,\mathrm d x$$
Interesting enough, though, you may express LoTP as: the marginal pdf is the expectation for the conditional pdf.
$$\begin{align}f_Y(y)&=\mathsf E( f_{Y\mid X}(y\mid X))\\&=\int_\chi f_{Y\mid X}(y\mid x) f_X(x)\,\mathrm d x\end{align}$$
And so too when dealing with measures over a conditioning event.
$$f_Y(y\mid T=1) = \int_\chi f_{Y,X}(y,x\mid T=1)\,\mathrm d x$$
This is analogous to the application of LoTP for discrete random variables.
$$\mathsf P(A= a\mid\mathcal E) = \sum_b \mathsf P(A=a, B=b\mid\mathcal E)$$