What is the reason for this change? I had been under the impression that the rules from this (http://www.russianlessons.net/grammar/nouns_dative.php) page apply to the changing of the noun ending.
Unfortunately, your page doesn't mention this important phenomenon which is called беглая гласная 'a fleeting vowel.' The thing is like this: in some words, the stressed vowels o, e, and ё completely disappear, turn to null, when the form of the word changes and the stress moves onto another vowel. Your noun рот has its root stressed, but when we form the Genitive case and add the ending -a, the stress moves onto this ending and the -o- in the root disappears.
The fleeting vowels are met very often in Russian and also in all the other Slavic languages, that's a common-Slavic phenomenon. But note, not every o, e, and ё is fleeting, e.g.:
кóт — котá : no vowel disappears.
сóн — снá
бeрý — брáть
звонóк — звонкá
You have to remember in which words the vowel disappears, a good dictionary marks such words and their forms.
The reason why these vowels disappear is that the ones that do, descend from the ancient very short, reduced, vowels known as yers: a short high front vowel denoted as ĭ or ь, and a short back vowel denoted as ŭ or ъ. These vowels underwent reduction and were eventually deleted in certain positions in a word in the early Slavic languages, but if they were in a stressed position, they changed into the full vowels, in Russian into e and o respectfully. This phenomenon is called Havlík's law.
And again, note, рта is not the Dative case, it is the Genitive case of рот, the Dative case from this noun is рту.