Let $\left( X, \mathcal{F}, \mu \right)$ be a measure space. I want to make sense to the integral $$\int_{X}f(x)d\mu (x).$$ It's easy to give meaning to this when $f$ is a simple function. But if $f$ is not simple, the first idea is to approximate $f$ by simple functions such that $$\int_{x}f(x)d\mu(x) = \lim_{n}\int_{X}f_{n}(x)d\mu(x).\qquad (1)$$ The problem is, that not all functions can be approximated by simple functions, why we need measureable functions which are those functions that can be approximated by simple functions. So the author gives the following definition (when $f$ is non-negative) $$\int_{X}f(x)d\mu(x) = \sup_{\phi}\int_{X}\phi(x)d\mu(x) \qquad (2),$$ where the supremum is taken over the class of simple functions $\phi$ such that $0\leq \phi \leq f$.
So if every measureable function can be approximated by simple functions why do we need (2); couldn't we just use (1) always ?
I'm also confused since another author writes the following

Definition (2) says exactly what the integral is; the right-hand side is perfectly well defined. There are problems with trying to use (1) as a definition. First you need to specify in what sense the simple functions $f_n$ "approximate" $f$. And then you need to show that $\lim\int f_n\,d\mu$ exists.
Note that, for example, if you just assume that $f_n(x)\to f(x)$ for every $x$ it does not even follow that the limit of the integrals exists. So whatever sort of approximation you have in mind for (1) it has to be something other than pointwise convergence...