It's no secret that tonality in Mandarin is a fairly recent phenomenon. Old Chinese, the ancestor to Modern Mandarin, had no tones. Instead, suffixes at the ends of words were reduced into rising and falling tones, and then diversified into several different kinds.
This tends to surprise most, as people tend to assume that tonality is a very complex feature - and that complex features are probably older, right? The reverse is true. The creation of tone changes was a labor saving device that made clear communication possible in less time.
Excitingly, a linguist of Mandarin has taken a sentence and mapped its evolution in pronunciation, starting with Old Chinese of 1200 BCE and progressing step-wise with each sound change till the modern era. Take a listen: