The fundamental validation of the Monte Carlo method is the Law of Large Numbers: when $𝔼[X]$ does exist, meaning when $𝔼[|X|]$ is finite, then the empirical average$$\frac{1}{T}\sum_{t=1}^T X_t$$converges almost surely to $𝔼[X]$. 

When the expectation $𝔼[X]$ does not exist, meaning$$\int |x|f(x)\text{d}x=+\infty$$there is no guarantee for the empirical average to converge, see e.g. the case of the Cauchy sequence, although there exist cases when it converges. As discussed in [another XV question][1]:

> Counter-examples provided in [Wikipedia][2] are 
> 
>  1. $X=\sin(Z)\exp\{Z\}/Z$ when $Z\sim\mathcal{E}xp(1)$, with $\mu=\pi/2$
>  2. $X=2^Z(-1)^Z/z$ when $Z\sim\mathcal{G}(1/2)$, with $\mu=-\log(2)$
>  3. $X\sim F(x)$ with $$F(x)=\mathbb{I}_{x\ge e}-\frac{e\mathbb{I}_{x\ge
  e}}{2x\log(x)}-\frac{e\mathbb{I}_{x\le-e}}{2x\log(-x)}+\frac{\mathbb{I}_{-e\le
  x\le e}}{2}$$with $\mu=0$
> 
> [in the sense that the rv's have no expectation but there exists a
> limit $\mu$$-$in probability if not a.s.$-$for the sample average $\bar{X}_n$].

See also [this quite informative answer][3] on XV.


  [1]: https://stats.stackexchange.com/a/328039/7224
  [2]: https://en.wikipedia.org/wiki/Law_of_large_numbers#Differences_between_the_weak_law_and_the_strong_law
  [3]: https://stats.stackexchange.com/a/29891/7224