Hilbert spaces are used so you can treat functions like vectors.
If you have a function F(x) defined between, say, a and b, well, kF(x) is also a function; and kF(x) + mG(x) is also a function; and there's a 0 function and an additive inverse and so on.
So the set of all functions defined...