Because he believed
"Then was the king exceeding glad for him, and commanded that they should take Daniel up out of the den. So Daniel was taken up out of the den, and no manner of hurt was found upon him, because he believed in his God." - Daniel 6:23
Reading the story of Daniel we realize the one fatal mistake we all make so frequently - we stop to believe. Scripture says as, believing, you shall receive. Did you stop to believe? Things may look all doom and gloom now but never stop to believe.