The Hogyoku was not a naturally formed gem, but something artificially created.
Long before the Bleach storyline began, Kisuke Urahara, then captain of the 12th Division, had accidentally created a substance capable of breaking the boundary between Bleaches and Hollows. This was the Hogyoku.
Unfortunately, Kisuke Urahara had been mistaken. The Hogyoku's true power was not to break the boundary between Bleaches and Hollows, but to fulfill its owner's inner wishes!
The Hogyoku itself possessed self-awareness. It could sense its owner's deepest desires and manifest them.
Of course, the prerequisite for manifesting a wish was that the person using the Hogyoku had to possess the possibility of making that wish come true. Otherwise, it was all empty talk.
Simply put, the Hogyoku could not create something from nothing like the Dragon Balls or Aladdin's lamp. Instead, it altered the rules of the world within a limited range.
Take Kisuke Urahara, for example. He wanted the Hogyoku to break the boundary between Hollows and Bleaches, and he himself possessed the potential to achieve that wish. Therefore, in accordance with his desires, the Hogyoku displayed the ability to break the boundary between Bleaches and Hollows.
That was the Hogyoku's true power!
However, Kisuke Urahara knew none of this. When he discovered that the awakened Hogyoku had released power several times greater than captain-level Spiritual Pressure, he feared that such an overwhelming force would endanger Soul Society, so he temporarily sealed it away.
At the same time Kisuke Urahara created the Hogyoku, Aizen, who had only been a Bleach vice-captain at the time, also created one. To do so, he sacrificed tens of thousands of souls in Rukongai with the potential to become elite Bleaches.
Later, Aizen directly used the Bleaches of Seireitei for Hollowfication experiments. While investigating the matter, Sōsuke Aizen, then