It's a coincidence as Mandarin Chinese evolved from Medieval Chinese.  
In Korean, whose pronunciation is close to Medieval Chinese, 努力 is pronounced "noryeok", and 奴隸 is pronounced "no(r)ye".  
Mandarin Chinese is a mixture of Medieval Chinese and Manchurian phonetic system. When you trace many phonetically similar characters and words to 500 to 1000 years ago, you may find them totally different in pronunciation.