Why did motorized public transportations had to move in rail ways only in the land in 19th century?

Why did motorized public transportations had to move in rail ways only in the land in 19th century.

They can move in rail ways but they can't move without rail ways. Why?

Why did motorized public transportations had to move in rail ways only in the land in 19th century?
Post Opinion