I just started studying measure theory.The introduction starts with the failure of limit of integral not equal to integral of limit in Riemann integration.I want to know why this problem

$\underset{n\to \mathrm{\infty}}{lim}{\int}_{a}^{b}{f}_{n}(x)dx={\int}_{a}^{b}\underset{n\to \mathrm{\infty}}{lim}{f}_{n}(x)$

is so important in analysis or what are benefits of limit of integral being equal to integral of limit.

Also, is this only drawback of Riemann integral?Is there any other problem with Riemann integration which leads to generalisation of Riemann to lebesgue integration?please clearly explain the motivation behind lebegue integral so that I could develop intrest in subject.

$\underset{n\to \mathrm{\infty}}{lim}{\int}_{a}^{b}{f}_{n}(x)dx={\int}_{a}^{b}\underset{n\to \mathrm{\infty}}{lim}{f}_{n}(x)$

is so important in analysis or what are benefits of limit of integral being equal to integral of limit.

Also, is this only drawback of Riemann integral?Is there any other problem with Riemann integration which leads to generalisation of Riemann to lebesgue integration?please clearly explain the motivation behind lebegue integral so that I could develop intrest in subject.