The scholars tell us that when the scribe asked Jesus what was the greatest commandment, he was asking Jesus to take one side in a current debate between the scribes' While some of them thought the greatest commandment had to do with keeping holy the Sabbath, others thought it was one dealing with only eating Kosher meals.
When Jesus sidestepped that debate by saying the greatest commandment was "Hear oh Israel, the Lord is God, the Lord alone." Jesus added, "The second is like that, "You shall love your neighbor as yourself."
The scribe was in admiration of the simple truth of Our Lord's answer. In repeating Our Lord's answer he changed it a bit, blending the commandment to love God and too love the neighbor into one commandment.
Jesus was pleased that the scribe linked loving God and loving our neighbor, because the way we love God is by loving our neighbor