I'm aware the two kanji are often pronounced the same, but why does one contain the other in it?
That is called 形声. About 90% of all kanjis are created in this way. In this case, the left side
言 is responsible for the meaning, and the right side,
吾 is responsible for the pronunciation. In turn,
吾 is composed of the upper part
五, which is responsible for the pronunciation and the lower part
口, which is responsible for the meaning. Why is
五 included in
語? Because it was created so. Why is this way of creating kanji so popular? Because it will be a mess if thousands of kanjis were all pictograms, and if the pronunciation and the meaning are combined, it will be easy to both remember its meaning and the pronunciation.
In Middle Chinese and a reconstruction of Old Chinese, 吾 and 五 have the following readings (Baxter):
五: wu3 < ngu < *nga
吾: wu2 < nguX < *ngaʔ
語: yu3 < ngjoX < *ng(r)aʔ
In modern Mandarin, 語 (yu3) and 五 (wu3) have diverged in pronunciation, but according to reconstructions they were pronounced similarly in antiquity.
There are other cases of 形声 where the phonetic does not apparently match the pronunciation -- some of these are because of this divergence.