Imu is the devil of the sea hailing from its abyssal depths also known as the god of the sea in ancient times, his biggest power is the ability to grant people’s wishes. Like a wishing well
Just like tales in our world “A deal with the devil , The devil with grant any desires of humankind but in exchange for your soul”.
So should Imu grant one’s wish that person’s soul will now belong to Imu. Once they die it will go to Imu along with all of the miracles given by their granted wishes.
Ex. Lets A Warrior King wanted to become fire to defeat all of his enemies swiftly without contest so he makes a wish to Imu, His wish is granted but once he dies his Soul along with the miracle given to him(Fire powers return to Imu).
This is how devil fruits were created. As Vegapunk stated devil fruits are created through the desires of humans. Through Imu he stored the souls of those that passed away into fruits but maybe this wasn’t his plan all along.
This also might explain the weakness of Devil Fruits when they sink to a certain depth under the ocean. Because the souls are naturally drawn to their place of origin the depths of the sea(The underworld). Because it is part of Imu they become powerless the closer they get to its influence.
So Why did Imu wanted control of the world?
Maybe because the souls of the denizens of the world give him power and he wanted to be the only god. A corrupt world where people desire power and riches would cause men to seek him out, worship, and become subservient to him. While giving him all the souls of mankind. A god ruling men both flesh and spirit of the world.
More powerful and absolute than any god that the world of one piece has seen.(See Skypeia, Sun God Nika).
But just like the story Drum Kingdom full of corruption and ruin from an unjust king. The world was full of strife, corruption, slavery, racism and unjust rulers. I believe that the story of Drum Kingdom was a scaled version of the story of the ancient kingdom.
I believe Joyboy was what Dr. Hiriluk was to Drum Kingdom was to the World during the Void Century. He was laughed at for his dream of trying to unite the people of the world just as The doctor was often laughed at as a quack doctor trying to cure people.
But Through his bond he succeeded and creating a pirate crew then creating a Utopia(Something crocodile desires). And Showed what unity and love toward each other regardless of race and status can achive. We can see this on how advanced their technology is compared to the rest of the world of one piece. From futuristic inventions, Robots, Holograms, Machines that create food for hungry people that cannot afford it, Permanent sources of electricity. Truly a utopia full of brotherhood, family, free of discrimination.
But just like Wapol in Drum Kingdom healing the ailing and corrupted hearts of the world would cause the rulers to lose their grip. All their wealth through slavery, war, backstabbing may suddenly be gone. Some nations might suddenly act righteous, Powerful races like Giants, Lunarians, Fishmen, Oni’s might start to rebel and embrace the Values of freedom and Unity being spread by the Ancient Kingdom’s Influence.
And the worst part is Imu might lose a grip on the world no longer needing it’s One and Only god. So he took initiative and rallied the kings. Just like a devil preying on their fears and desires united them to destroy the ancient kingdom before they destroy us. And Rightly so it would be believable seeing the might the ancient kingdom possessed. Just the ancient weapons alone could topple countries should they desire.
So That Day Imu created the devil fruits to pass on unnatural powers from the souls he holds to further bolster their forces and defeat the ancient kingdoms powerful technological might.
Just like Dalton In Drum Kingdom there are those that faltered among Joyboy’s people (Zunesha, Ruler of Alabasta) and made a deal with Imu rather than fight him(Just like Dalton serving Wapol).
But during the battle seeing Joyboy refusing to fight the 20 Nations possibly because of the amount of innocents turning into casualties and ending up destroying the world. He realized that the only way to correctly stop this is the entire world to unite.
They came to their senses just like when Dalton realized his wrongs when Dr.Hiriluk didn’t fight and accepted his fate rather entrusted his will to the next generation to cure drum kingdom(Which maybe Zunesha’s and The Alabasta Rulers Sin they were making up for).
So instead they created the poneglyphs, Hid The Ancient weapons, And Sabotaged the possible tree of devil fruits so that it ends up scattered around the world. All These tools were left so that when the world one day unites they will be able to cure the world’s ailing heart and fulfill Joyboy’s will. A world truly united A world as one piece.
With that, the 20 kings left the world and sat at the highest point of the world Marijoa ascending as gods of the world watching over it. With Imu perched at its very peak from the abyssal bottom of the world disguising the underworld as the “heavens of the world”.
Theory by Accurate-Display7956 (https://www.reddit.com/user/Accurate-Display7956)