ickoonite parent
Some of it comes from importing words from different parts of China or at different times in history. From my (very) limited experience, Japanese pronunciations of kanji are much closer to Cantonese or Hokkien than Mandarin.
It's worse than you think. The oldest readings came from KOREA where they used rhyme dictionaries to create a full system of Sino-Korean pronunciations without regards to the actual sounds.