Originally Posted by **avito009** During Einsteins time there was no spaceship so he did a thought experiment with a spaceship using twin paradox. |

That's not quite correct.

Originally Posted by **avito009** But why did Einstein need a thought experiment to prove time dilation? |

He didn't. Einstein invented and published relativity in 1905. In that paper Einstein stated two postulates (here stated in modern terminology) (1) the laws of physics are the same in all inertial frames of reference and (2) the speed of light is the same in all inertial frames, i.e. independent of the motion of the source (i.e. c is invariant). After he stated those two postulates he then derived the relationships between spacetime events in two inertial observers. There is no mention of a twin paradox in that paper.

Originally Posted by **avito009** During his time there were trains and the train's clocks run at 4/5 the rate of the station clocks. So here we have a proof, an actual experiment. So why need a thought experiment? |

First off physics is not about proof. That's a common misconception. A friend of mine at MIT Explains if in a video he did for me.See:

http://www.newenglandphysics.org/com...an_Guth_04.mp4
Second, thought experiments help people understand nature. Einstein's first thought experiment was about what he would see if he was riding a bicycle.

The twin paradox wasn't published until 1911 where he co-authored a paper with physicist Robert Resnick. The paper didn't talk about spacesshjps or trains or bicycles etc. The spoke merely of a traveling observer.

See:

https://en.wikipedia.org/wiki/Twin_paradox#History