The logic of these verses is as follows:
When people work, their pay is what they earn, not a gift.
The idea not stated is that God never owes his creatures anything. They owe him everything. So, anything he gives is a gift (see also 9:14–16).
The conclusion is that God does not place people in a right relationship with him because of their works.