Though Christ had not yet come, Daniel prayed in the spirit of God's mercy that would be fully revealed and realized in Him. Why we pray affects how we pray. If I am simply reading God my wish list, it is—rightly—beyond my comprehension why He would listen at all, let alone come through for me. But if the basis of my prayers is God's mercy and the sake of His name, then how can He do any less than show His glory?
This is not to say I know what that should look like. But I can and should ask boldly, because He does and will do it. I can and should confess boldly—my confession of who I am, how I've sinned, and my need for His mercy is actually essential to why He would act. Daniel's confession was rooted in genuine sorrow rather than self-centered shame—he didn't try to hide who he was and how he'd failed. And he was prepared to receive from God with gratitude rather than pride—God would respond for the sake of His name, not because of Daniel's performance.
God's answer (Daniel 9:20-27) may not have been what Daniel expected, but the basis of His answer, delivered by Gabriel, made it completely trustworthy: "...for you are greatly loved" (Daniel 9:23). This is the glory of God revealed.