Luke was never trying to teach Rey how to use the Force. He was trying to show her why the Jedi needed to end- and, by extension, why he would not train her.
The first lesson was supposed to show Rey what the Force actually was; she already knew how to access it, but she had no idea what it was or how dangerous it could be, like a child playing with a loaded gun. It made sense to show her that she was only a small part of the Force, and how she could not control it herself.
The second lesson was about how hubris destroyed the Jedi and created the Empire. So again, Luke is trying to show Rey that the Force is dangerous, and how she should definitely not rely on it to find her parents or save the Resistance.
The way I see it, Luke couldn't just kill Rey: last time he tried that it backfired horribly (and at this point he has neither lightsaber nor the Force to help him). He also couldn't train her to use her power, because again that didn't go so well with Ben Solo, and Rey looked like she was going down the same path. Instead, he tried to show her that she didn't own the Force, and could never master it to get what she wanted, and if she tried it would only end in tragedy for her. Essentially, as Yoda explained, he taught her about failure, so she could grow beyond it.