Native Mandarin speaker here. On one hand it's true that basic rhyming is easier due to the regularity of the unit of sound and the number of characters sharing the same "final vowel" 韵母.
However, there's also the tone system. Pronouncing the tone as it's normally pronounced may interfere with the melody. So it's actually very hard to write good lyrics that works with both.
In modern Mandarin music, this problem is usually bypassed by relaxing the tone a bit when singing (the phenomenon is called 倒字). However, serious lyric writers do strive to achieve both goals at the same time. (Cantonese songs are especially good in this regard.)
Compare to the classical Chinese. According to tones, all characters are divided into two classes 平仄, which follows a specific pattern in a poem 格律. The poem is also the lyrics of a melody 律诗. So this system helps you to do both.
