The origin and properties of massive prolate galaxies in the Illustris simulation