In general, sine functions are not the only eigenfunctions of the (self-adjoint) Laplacian. As I'm sure you know, the general solution to the second-order linear ODE is a sum of sine and cosine. It's only when you apply boundary conditions that you obtain a relationship between the two components, in which case you've essentially changed the vector space under consideration.
Looking at your example, consider the quantum mechanical particle-in-a-box. The boundary conditions require that all wavefunctions vanish at the edges of the box. Therefore, one may as well say that the vector space under consideration is the set of continuous and differentiable complex functions on the interval [0,L], which also vanish at the endpoints. When you find the eigenvectors of the Hamiltonian, you then apply the boundary conditions, coming up with the familiar family of sine functions. Linear algebra tells us any vector in that space will then be expressible as a linear combination of eigenvectors of the Hamiltonian (which is Hermitian). Therefore, any continuous and differentiable complex function on [0,L] which vanishes at the endpoints can be expressed as a combination of those sine functions.