To ease explanation, consider the complex exponentials e^{ikx} instead of sines and cosines, and consider the complex exponential version of the fourier transform.
If you give it a bit of thought, you will realize that the fourier transform of e^{ikx} is not actually a function, but rather a delta "function" (really, the delta distribution). Why? e^{ikx} is a perfect wave of a single frequency, so it's Fourier transform has all of the weight concentrated at a single point k, and no weight at any other frequencies.
Therefore the natural space to think about Fourier transforms of things like e^{ikx} is a space of distributions. The space commonly used is the dual space to the Schwarz space, and then the Fourier transform is F:S'>S' rather than F:L2>L2.
The complex exponentials might form a Schauder basis for S', though I highly doubt it. They certainly don't form a Hamel basis. This is actually an interesting question.
