Jesus was referring to Mic. 6:8.
He hath shewed thee, O man, what is good; and what doth the Lord require of thee, but to do justly, and to love mercy, and to walk humbly with thy God? (KJV)
At Matt. 23:23 faith is accomplished by and through trust and fidelity. It is the meaning at Strong's Gr. 4102 , definition 2, of keeping the faith, and trusting in YHWH. The first commandment, Ex. 20:3,
`Thou hast no other Gods before Me. (YLT)
The scribes and Pharisees were twisting the words of God, the laws by adding to and inventing new commandments to lay upon the people (Matt. 15:3-9). They were therefore not believing and trusting to keep God's word, but stepping around Him and placing themselves above Him. Who were they honoring, God or themselves? Where was their faith placed, in God or in themselves?
Faith is conviction or knowledge of the truth of someone or something. You cannot have faith in God without knowing His word. No one can have trust in another without learning of Him. So, as the scribes and Pharisees were not abiding by His word, they were not walking with Him, then they were not doing what would bring faith to completion. It is expressed as love in Luke's gospel.
`But wo to you, the Pharisees, because ye tithe the mint, and the rue, and every herb, and ye pass by the judgment, and the love of God; these things it behoveth to do, and those not to be neglecting. (Luke 11:42, YLT)
Because the love of God is a doing thing by keeping His commandments because of our belief and faith in Him. If we do not do the things He has commanded then how can we or anyone say they have faith in Him. Luke 6:46, and John 14:15
And why call ye me, Lord, Lord, and do not the things which I say? (KJV)
If ye love me, keep my commandments. (KJV)
The scribes and Pharisees did not trust in God's word, and were not walking with Him. They were not keeping the faith.