Why we use $L_2$ Space In QM? I asked this question for many people/professors without getting a sufficient answer, why in QM Lebesgue spaces of second degree are assumed to be the one that corresponds to the Hilbert vector space of state functions, from where this arises? and why 2-order space that assumes the following inner product:
$\langle\phi|\psi\rangle =\int\phi^{*}\psi\,dx$
While there is many ways to define the inner product.
In Physics books, this always assumed as given, never explains it, also I tried to read some abstract math books on this things, and found some concepts like "Metric weight" that will be minimized in such spaces, even so I don't really understand what is behind that, so why $L_2$? what special about them? Who and how physicists understood that those are the one we need to use?
 A: Here we will assume that OP is not questioning the fundamental physical principles/postulates/axioms of quantum mechanics, such as, e.g., the need to have a Hilbert space $H$ in the first place, etc; and that OP is only pondering the role of $L^2$-spaces (as opposed to, e.g., $L^1$-spaces). 
Let us for concreteness and simplicity consider the 3-dimensional position space $\mathbb{R}^3$. One uses the $L^2$-space $H=L^2(\mathbb{R}^3)$ as a Hilbert space for various reasons:


*

*To have a well-defined norm 
$$\tag{1} ||\psi||_p~:=~\left(\int d^3x ~ |\psi(x)|^p\right)^{\frac{1}{p}}, \qquad p~=~2.$$
[The norm (1) actually works for any $L^p$-space $L^p(\mathbb{R}^3)$ with $p\geq 1$.]

*To have a well-defined inner product/sesqui-linear form, 
$$\tag{2} \langle \phi, \psi\rangle ~:=~\int d^3x ~ \phi^*(x)\psi(x).$$
In particular, the integrand $\phi^*\psi$ should be integrable, i.e. i) Lebesgue measurable, and ii) the absolute-valued integrand should have a finite integral: 
$$\tag{3} \int d^3x ~ |\phi^*(x)\psi(x)|~<~\infty.$$
Proof of eq.(3): Notice the inequality 
$$\tag{4}  (|\phi(x)|-|\psi(x)|)^2 \geq 0\qquad \Leftrightarrow\qquad  2|\phi(x)^*\psi(x)| \leq |\phi(x)|^2+|\psi(x)|^2,$$ 
so that the integrand $\phi^*\psi$ in the inner product (2) becomes integrable
$$\tag{5} 2\int d^3x ~ |\phi^*(x)\psi(x)|~\stackrel{(1,4)}{\leq}~ ||\phi||^2_2+||\psi||^2_2~<~\infty, $$
because we demand that $\phi$ and $\psi$ are square integrable, i.e. that $\phi,\psi\in L^2(\mathbb{R}^3)$. Note in particular that eq.(3) does not hold in general for $\phi,\psi\in L^p(\mathbb{R}^3)$ with $p \neq 2$. 

*To ensure that the normed vector space $H$ is complete. See also this Phys.SE answer. [This actually works for any $L^p$-space $L^p(\mathbb{R}^3)$ with $p\geq 1$.]

*To make sure that e.g. the set $C^{\infty}_c(\mathbb{R}^3)$ of infinitely many times differentiable functions with compact support are included in the space $H$. [This actually works for any $L^p$-space $L^p(\mathbb{R}^3)$ with $p\geq 1$.]

*Note that all the other $L^p$-spaces $L^p(\mathbb{R}^3)$ with $p\neq 2$ are not Hilbert spaces (although they are Banach spaces). This is related to the fact that the dual $L^p$-space is $L^p(\mathbb{R}^3)^*\cong L^q(\mathbb{R}^3)$ where $\frac{1}{p}+\frac{1}{q}=1$. Hence an $L^p$-space is only selfdual if $p=2$. Selfduality implies that there is an isomorphism between kets and bras.

*It is true that other Hilbert spaces (modeled over the position space $\mathbb{R}^3$) do exist, but they would typically rely on additional structure.
(E.g., one could use another integration measure $d\mu$ than the Lebesgue measure $d^3x$.) 
In conclusion, the $L^2$-space $H=L^2(\mathbb{R}^3)$ is the simplest and most natural/canonical choice.
A: The traditional setting for quantum mechanics is a Hilbert space. An observable $X$ with a continuous real spectrum (such as a component of position or momentum) has a representation in which it is diagonal, and by some version of the spectral theorem, the Hilbert space is automatically isomorphic to the space of $L^2$ functions $\psi(x,s)$ (where $s$ denotes quantum numbers of observables independent from $X$ but commuting with it) such that $X$ is represented as multiplication by $x$.
Thus the $L^2$ structure is not arbitrarily imposed on quantum mechanics but is deducible mathematically from the existence of observables with a continuous real spectrum.
In 1925, the early days of QM, Heisenberg came up with a space of vectors with infinitely many components, while Schroedinger came up with a space of wave functions. In 1932, von Neumann (who proved the spectral theorem) showed that the two forms of QM (matrix mechanics and wave mechanics) were just the case of distinguishing (in the representation used) observables with discrete spectrum (energy and angular momentum of a bound particle) or observables with continuous spectrum (position or momentum of a bound particle). 
There is no real diference between these representations; only the collection of operators diagonal in the representation is different.
Therefore, they give fully equivalent results but it depends on the problem which formulation gives easier access to computations. Schroedinger's approach is usually preferred in ordinary quantum mechanics, while Heisenberg's is primarily used in quantum field theory (since the harmonic oscillator approach generalizes more easily to quantum fields). 
A: First, let me emphasize that position and momentum eigenstates do not belong to $L^2$. Moreover the canonical state for a LPS has not Hilbert space norm.
The fundamental answer to your question is encoded in the underlying phase space structure. In the phase space formulation of quantum mechanics the state of a system is given by a function $F(p,q;t)$ of which only normalization is required; nothing is said about the integral of its square (or any other properly defined scalar product with itself). Normalization can be understood in physical terms (probabilities) or, mathematically, using the unit element relation $\langle 1 \rangle = 1$.
Averages of dynamical quantities are obtained as the product of dynamical phase space functions $b(p,q;t)$ and states $F(p,q;t)$. This in a kind of Banach space with dynamical functions playing the role of 'bras' and states the role of 'kets'. In fact, the phase space average can be rewritten as $\langle \langle b(p,q;t) | F(p,q;t) \rangle \rangle$.
The Hilbert space and the $L^2$ structure can be derived from the underlying phase space by introducing a decomposition of the state $F(p,q;t)$ in complex-valued amplitudes $\Psi(q;t)$.
$$ \langle \langle 1 | F(p,q;t) \rangle \rangle = \langle \Psi(q;t) | \Psi(q;t) \rangle $$
Notice that the phase structure is more general than Hilbert and $L^2$ spaces and accounts for mixed quantum states, which are not described by any $\Psi(q;t)$.
