The question in the title has been answered by this MOF post. One reason is that Lebesgue measurable function is *bad* since may not be Lebesgue measurable even if function and random variable are both Lebesgue measurable. A good explanation is from Exercise 2.9.d of real analysis book by [Folland 1999], which will be given below.

Before we start, we define the following notations: Let and be Borel and Lebesgue -algebra of real number set , respectively. Since is the completion of , all subset of zero Lebesgue measure is again zero measure and belongs to . Therfore, any subset of *Cantor set* is Lebesgue measurable set. A function is said to be *Lebesgue measurable* if .

[**Problem**] (Ex.2.9.d of [Fol99]). There exists a Lebesgue measurable function and a continuous function (of course Lebesgue measurable) such that is not a Lebesgue measurable.

*Proof:* Let be the Cantor function and be . According to Ex2.9a-c of [Fol99], there exists a subset of Cantor set satisfying

Note that (But ). Consider an indicator function . By definition, is Lebesgue measurable function and

Now satisfies the requirement, since its inverse image of is , i.e