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