There are only two orientations from which we might view God and His Law: distrust and hope. We either believe God is good, and therefore that His decisions, evaluations, ways, laws and judgments are perfectly righteous and just (Ps 119:128), and thus we delight in God’s laws, and expect perfect goodness to come from obeying them, regardless of appearance (Ps 119:75), or we distrust God in some way, and expect His ways might be less than optimal, that we might fare better apart from Him.
The former view aligns us with reality, the latter postures us as the ultimate judges of God and of His Word (Ja 4:11), of Being itself, and thus aligns us with lies, darkness and deception. (Pr 4:19)
So, the Psalmist can ask God to keep him in the way of truth because he has maintained a posture of hopeful expectation in God’s judgments (Ps 119:43); he is trusting God in the face of suffering and injustice, hoping in God’s Word (Ps 119:147), trusting God will reconcile all things, and hasn’t set himself up as the judge of Being.
The corollary is that the more we posture ourselves as judges of Being, disdaining God’s purpose in Creation, questioning God’s wisdom in allowing evil and suffering in this world, the more we forfeit our access to and alignment with the truth.
Trusting in the goodness and love of God is a process, growing in the grace and knowledge of God. (2Pe_3:18) Casting ourselves upon God, let’s be asking Him to give us this understanding (Ps 119:34), making us understand the way of His precepts (Ps 119:27), and inclining our hearts unto His ways. (Ps 119:36) And let’s ask in faith, nothing wavering (Ja 1:6), knowing God is pleased to satisfy those who hunger and thirst after righteousness. (Mt 5:6)