It might have been clear to you, but to many people it came completely out of left field. I'm unaware of any specific references to JMT in the movie before or after that scene and i've seen it 3 times. Having to come up with our own explanations or assumptions means there was something left to be desired in the execution. Relying on the audience to call back to the previous movies to handwave something a main character does with no cues or agency is lazy.
Most of the below is clearly discussed and or shown in TFA:
1) The Force is a well enough established concept to viewers.
2) Rey is naturally Force sensitive (said and clearly implied multiple times in the movie).
3) Rey is familiar with Luke and the legends.
4) Jedi Mind Trick is a well known thing Jedi do. Evidenced by previous films.
5) Han affirms to her that all of the stories she's heard about Luke and the Jedi are true.
6) Maz tells her the Force is calling to her.
7) She is locked up in a chair, and left alone with a single guard. So she attempts one of the things she's heard Jedi can do.
8) She is unsure at first and doubts, so she fails twice. She opens herself up and believes, and succeeds the third time.
It's all in the movie. It's all there. None of that is me coming up with my own assumptions, at all.
And it isn't lazy to call back to previous films seeing as how it is, you know, Episode
Seven in a well established series. So no, not at all. Not to mention it isn't necessary for the viewer to callback to previous films to believe what she did, it only serves to further support it is all.
Again, I don't think people were paying attention. Either to the different elements leading up to that moment, or to the Force in general as a concept and how it works within the universe and with the characters there.
Edit: for the record, I absolutely believe there are things this movie did not do well. This is just not one of them, and I'm honestly surprised at the amount of confusion with this scene.