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