Due to the presence of magic, technology on Ramath-lehi progressed in a very different manner. One difference is that the cannon was invented before gunpowder was discovered - instead, early Ramathian cannons used Fronima as fuel.
No-one knows exactly how the weapon came about, but there are a number of theories. One of the most popular goes as follows: during a war on the Sudesha continent, a soldier was carrying orbs filled with fire Fronima to his army's siege weapons. These orbs were commonly used as projectiles, as they would explode on impact and usually set nearby objects (or people) on fire. However, this was a gamble - while they had to be fairly sturdy to prevent accidents, a strong impact would still be enough to set them off.
As it happened, the other side of the battle was also using these orbs, and one of them landed on the siege weapon right as the soldier had reached it. This caused a chain reaction of explosions, taking out a considerable chunk of the army. Somehow, the soldier survived this (he may have used protective magic to shield himself), but he was badly injured and had to spend weeks in a healers' tent.
During his recovery, the soldier thought back to what had happened, and noticed that the first blast had thrown himself and the orbs a fair distance. As each orb landed and exploded, it threw other things as well. At one point, it had blown a war Juktarr away with such force that it flew right into some soldiers, crushing and killing them.
The story goes that this gave him an idea to create a weapon that would take advantage of that.