The Tesseract was a reinterpretation of the Cosmic Cube from the comics, which can warp reality in accordance with the will of whoever worlds it. And then there's the Reality Stone, which controlled reality. Kinda makes one wonder a little why they didn't make the Tesseract the containment vessel for the Reality Stone in favor of the Space Stone. Such a fusion might've had the Reality Stone and the Tesseract augment and merge their respective reality altering powers together as one, and the Tesseract might've glowed red instead of blue. Then again, perhaps the term "cosmic" in the artifact's M.C.U. name might've implied that it was supposed to be the container for the Space Stone.