Sometimes the Bible surprises us by explaining things differently than how our natural instincts would like. In the case of Psalm 119:75, there are two words that we might not think of together:
“I know, O LORD, that your rules are righteous,
and that in faithfulness you have afflicted me.”
How often do we associate God’s faithfulness with affliction? Don’t we usually associate it with our blessings? Yet there it is: “in faithfulness you have afflicted me.”
Earlier, in verse 71, David wrote:

“It is good for me that I was afflicted,
that I might learn your statutes.”
Then he says the benefit he gets from learning this is more than “thousands of gold and silver pieces”. Since we benefit from discipline, would God be unfaithful if He did not discipline us? Or do we only consider Him faithful when things seem to go well?
“My son, do not despise the LORD’S discipline
or be weary of his reproof,
for the LORD reproves him whom he loves,
as a father the son in whom he delights.” – Proverbs 3:11-12
He is faithful, always. Even in affliction. Perhaps especially.