She was taught by Luke for a third of the movie. That's how she learned to utilize her powers for good. She is the last Jedi because Yoda burned the sacred Jedi texts.
We don't need to use spoilers, I think people get what this thread is about at this point