The commutation relation $[A,B]=iI$ (i.e., $AB-BA=iI$) is not satisfied by two linear operators on any finite-dimensional linear space. So Quantum Mechanics requires infinite-dimensional spaces. Even in infinite-dimensional spaces, the commutation relation cannot be satisfied by two bounded operators $A$ and $B$; at least one of them must be discontinuous. The basic problem is that a differentiation-like property such as $\frac{d}{dx}x^{n}=nx^{n-1}$ causes the norm to increase without bound. Quantum Mechanics requires infinite-dimensional inner-product spaces. It is matter of convenience that the inner-product spaces are assumed to be complete (Hilbert) spaces.
John von Neumann was probably the first to recognize that the operators of Quantum Mechanics would have closed graphs in $\mathcal{H}\times\mathcal{H}$ because they would be symmetric
$$
(Ax,y) = (x,Ay),\;\;\; x,y\in\mathcal{D}(A).
$$
Symmetry is required in order to give real values for observation; in fact, symmetry in this setting is equivalent to the requirement that $(Ax,x)$ is real. That imposes an interesting restriction on $\mathcal{D}(A)$ because of the Closed Graph Theorem, which states that every linear operator with a closed graph that is defined everywhere on a Hilbert (or Banach) space is automatically bounded. Hence, some of the operators of Quantum are not going to be defined on the entire Hilbert space, because some of them cannot be bounded. But it is generally assumed that the domain $\mathcal{D}(A)$ of an observable $A$ is dense, which is good as you can do for the operators which must be unbounded.
John von Neumann studied adjoint for a densely-defined closed linear operator $A$ on a Hilbert space $\mathcal{H}$ by looking at the orthogonal complement of the graph $\mathcal{G}(A)$, which was a natural fit because of how one could interpret $(Ax,y)=(x,A^{\star}y)$ as an inner-product on the graph space in $\mathcal{H}\times\mathcal{H}$:
$$
\left( \langle x,Ax\rangle, \langle A^{\star}y,-y \rangle \right)_{\mathcal{H}\times\mathcal{H}} = 0.
$$
The above is an inner-product on $\mathcal{H}\times\mathcal{H}$ of the ordered pairs (not inner-product) $\langle x,Ax\rangle$ and $\langle A^{\star}y,-y\rangle$. So he used orthogonal complement in the Hilbert space $\mathcal{H}\times\mathcal{H}$ to prove the existence of an adjoint $A^{\star}$ for a densely-defined $A$ with a closed graph $\mathcal{G}(A)\subseteq\mathcal{H}\times\mathcal{H}$. A closed densely-defined linear operator $A$ has a closed densely-defined adjoint $A^{\star}$, but the domains may not be the same at all. The additional requirement that $A$ be symmetric forces the adjoint $A^{\star}$ to an extension of $A$, which means that $\mathcal{D}(A)\subseteq\mathcal{D}(A^{\star})$ and $A^{\star}=A$ on $\mathcal{D}(A)$; this is written as $A\preceq A^{\star}$. Hermitian for you is "symmetric" or, equivalently, $A\preceq A^{\star}$. Selfadjoint is $A=A^{\star}$.
Because the graph of $A$ and the graph of $A^{\star}$ are related through orthogonal complement in $\mathcal{H}\times\mathcal{H}$, enlarging the domain of a symmetric $A$ shrinks the domain of $A^{\star}$ and can lead to a situation where one obtains $A\preceq A_{0}=A_{0}^{\star}\preceq A^{\star}$. von Neumann characterized the symmetric operators with selfadjoint extensions, and he described all possible selfadjoint extensions of a symmetric operator $A$, which are restrictions of the adjoint $A^{\star}$. This has to do with abstract "boundary conditions". Quantum Mechanics formulations require selfadjoint observables; symmetric is not enough.