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