There are several approaches to integration theory, all of them producing the same class of integrable functions. The most commonly taught in class nowadays are based on measure theory, starting by integrating measurable simple functions. Not surprisingly the extension of the integral to more general functions imply measurability of the integrands by way of approximation theorems.
There is one particular approach due to Daniell and later by Stone, which does not make use of measure theory, starts with a simple integral (think of Riemann integral), extends it, and through an analysis of the properties of the integrable functions (Lusin and Littlewood principles), measurability is defined. This method I believe, shows why measurability is indeed inherent in integration.
Here is a brief explanation of how this construction works, avoiding technical details but trying to explain why we end up with having to deal only with measurable functions.
- Start with an elementary integral $I$ (for example the Riemann integral on $[a,b]$) on a space of bounded functions $\mathcal{E}$ (continuous functions on $[a,b]$ for example) which has a nice linear and order structure structure (a Stone lattice: $f,g\in\mathcal{E}$ then $cf+g, \max(f,g), \min(f,1)\in \mathcal{E}$). The integral $I$ on $\mathcal{E}$, is linear and positive, i.e. $I(f)\geq0$ if $f\geq0$, and has some countable continuity properties.
- Then a rather natural pseudo-norm $\|\;\|^*$ (the Daniell mean) can be define for any function on the space. The space of functions $\mathcal{F}$ for which that peusdo-norm is finite turns out to also be also a linear space. This is down by and up and down procedure: Let $\mathcal{E}^\uparrow$ the space of all numerical functions $h$ that are the countable suprema of a sequence $\phi_n\in\mathcal{E}$. For $h\in\mathcal{E}^\uparrow$
$$\int^*h=\sup\{I(\phi): \phi\in\mathcal{E}, \phi\leq h\}$$
for any function numerical function $f$
$$\int^*f=\inf\{\int^*h: h\in\mathcal{E}^\uparrow, f\leq h\}$$
Define $\|f\|^*=\int^*|f|$. It is easy to check that $I(\phi)=\int^*\phi$ for all $\phi\in\mathcal{E}$, and that $\|\;\|^*$ is homogeneous and has a triangle inequality.
- Then the space of integrable functions $L_1(\|\;\|^*)$ is defined as the closured of the set of elementary functions $\mathcal{E}$ on the big space $\mathcal{F}$ with respect the pseudonorm $\|\;\|^*$.
- The elementary integral $I$ is then expanded to $L_1(\|\;\|^*))$ by means of Cauchy sequences. The expansion $I$ is still linear an an positive.
- A consequence of the construction is that all integrable functions are in essence uniform limits of sequences of elementary functions $\mathcal{E}$ on large sets.
- Measurability is defined in terms of the property described in (5), that is, a function $f$ is $\|\;\|^*$-measurable iff on large sets, $f$ is the uniform limit of a sequence of an elementary functions.
- Further analysis shows that functions $f$ are integrable precisely when they are measurable and have finite $\|\;\|^*$-mean.
A nice treatment of this is in Bichteler, K., Integration theory: A functional approach, Birkhäuser. The book of Riesz, F. and Nagy, S. B, Functional Analysis, Dover, also starts with a functional approach. Several books now: Bogachev, V.I., Measure Theory, Vols I, II, Springer, Cohn, D., Measure Theory, Birkhäuser, among others) also dedicate a chapter to the ways of Daniell and Stone.
There is another theory of integration (at least for the real line and Euclidean space) that has the objective of having good fundamental theorems of Calculus. These are the Gauge integrals of Denjoy-Perron, and Henstock-Kurzweil (HK). The later starts with a slight change in the definition of Riemann sums, and yields a very rich set of integrable functions that includes Lebesgue integrable functions. Measurability creeps in again in the Fundamental theorem of Calculus, that is, a function that is integrable in the HK sense is necessarily measurable.
Daniell's approach to integration and the more general HK approach, which in principle have nothing to do with measurability, show that measurability is a natural property for integrable functions.