Saul was fortunate - he was given clear instructions from God through His prophet Samuel about the fate of the conquered Amalekites (Bedouin nomads who had long opposed Israel). All he had to do was obey God. The Pharisees of Jesus' time had no such notion, they would rely only on the teaching of the Torah.
Saul however, chose to go beyond what God had asked him to do, hoping to please God with holocausts and sacrifice. He was punished. The Pharisees clung to the Laws, e.g. on fasting, yet Jesus rebuked them for their narrow vision.
This makes us wonder: why was Saul wrong in going beyond God's commands, and yet the Pharisees who were strictly obedient were also shown to be in error? The explanation is simple. The similarity in these two seemingly dissimilar offences lies in a lack of discernment. Neither Saul nor the Pharisees really bothered to discern what God wanted of them. Saul chose to do what he himself thought fit, not what God had specifically asked him to do. The Pharisees were such sticklers for the petty details of the Law, they did not listen to God's voice either.
When we can properly discern and obey the will of God then only can we be considered "the upright". The human frailty of hoodwinking ourselves about our 'obedience' must be discerned and cast out.
Lord, give us the light to see Your message for what it truly is. Amen.