The italicized noun clause <em>that he had stolen the bricks from the site </em>is used as a direct object of this sentence.
What did the thief confess? That he had stolen the bricks from the site.
I read this a long time ago. But if I remember it’s because the paw grants wishes, so it’s hard to tell if the events are happening because of the paw or if they just so happened to occur at the same time.