Okay, so I know there's ninja inside King Slime, but why? I'm up for any personal theories, but mine is this:
I think that maybe, once, the slimes didn't have a king, and were plauged by predators left and right. What if there was a ninja who felt sorry for the slimes, (because back then they wouldn't really have been hostile, since they were being hunted constantly) and used his OP weapons, ('cause there are a ton of those) to fight off the predators and destroy them, thus freeing the slimes. And then, the slimes were so impressed that they wanted to keep the ninja forever, but naturally, he didn't want to stay. So a few of the slimes converged together around the ninja, trapping him in a huge blob. That would explain why little slimes break off of King Slime as you fight him. So the ninja was trapped forever inside the slimes, and because they now had a king, the slimes started attacking people, instead of hiding.