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