Quoted By:
>Aladdin finds himself trapped in the magic cave. Fortunately, Aladdin retains a magic ring lent to him by the sorcerer as protection. When he rubs his hands in despair, he inadvertently rubs the ring and a jinnī (or "genie") appears who takes him home to his mother. Aladdin is still carrying the lamp. When his mother tries to clean it, a second far more powerful genie appears who is bound to do the bidding of the person holding the lamp.
Hoopa is both genies. When you first get it, it's only associated with a ring; when you get its Unbound form, it's because of a bottle - turning it into a "far more powerful genie".
Also a reference to King Solomon's various bottled genies and efreets I suppose.