In the beginning of Avengers, (2012) Loki has a sceptre which contains the Mind Stone.
In the end of the previous film (Thor), Loki fakes his death. He doesn't have it till that point.
- Who gives him the Sceptre?
- Why would anyone give up the Mind Stone?
I'm not sure what makes the answer so obvious here. The person who hands the sceptre wants the Tesseract, which means the person is after the space stone. The same person gives Loki the Mind Stone to get the job done. Only Thanos could make a play like that, but we aren't shown Thanos giving this job to Loki here.