Bastila lead Revan into a trapped but instead of killing him atau her, whatever gender anda desided to be, they took Revan erased his/her memory so the Republic used him/her.
When anda play the game anda won't confused sejak the visions cause the visions is from your past of how anda were captured and how.