The thief is trying to steal the treasure of the "Wizard-Beast." Of course, he faces punishment. The main motif resembles Dunsany's texts about similar thieves, and as for Lovecraft's works themselves – The Terrible Old Man.
The Hoard of the Wizard-Beast were likely intended to be part of Robert H. Barlow's cycle, The Annals of the Jinns. The novella was not published during the authors' lifetimes.
The Hoard of the Wizard-Beast is 60% authored by Lovecraft.