Why is a railway's third line or overhead line DC and not AC?
Railway infrastructure is expensive. It is relatively rare to create totally new tracks and when you do, they most often conform to the engineering norms of the existing tracks (gauge etc) to allow for flexibility in rolling stock usage etc.

Therefore decisions about electrification were made in the 19th century (e.g. 1890 in London). At that time, speed control of large motors was probably easier for DC than for AC where the speed is linked to AC frequency.

Also at that time DC distribution had advantages over AC.

Subsequent technological revolutions are generally hampered by the need to maximise return on very long term investment in large-scale infrastructure. 

An interesting case is London's Thameslink which has trains that operate on overhead 25KV AC for the northern part of the journey and on third-rail 750V DC tracks for the portion of the journey south of Farringdon station. The costs of introducing incompatible infrastructure can be considerable.