Laws and regulations can only cover a defined range of actions. There is a limit of the specificity with which they can be drafted.
Consequently there is a degree of discretion that has to be granted in the interpretation and application of such laws and regulations, backed as they are with the coercive power of the state.
So a well functioning state requires well drafted laws and regulations as well as a degree of discretion in how they are administered. This mix of specificity provides the balance between efficiency and effectiveness that yields the greatest common outcome.
However, discretion is easily and quickly abused leading to crony capitalism and its ilk, favoring the privileged and abusing the less privileged.
The paradox is that discretion is both necessary and corrosive of the commonweal.