The 10 commandments reflect the character of God so one can argue the basis of law rests on the character fo God
Additionally I disagree with 'being self serving' is not necessarily moral, we are all self serving in some sense, it just happens in our case that serving others brings more joy to one self. In the case of God, the greatest happiness of man comes when they glorify God best. True Glory for God resonates with deep hapiness for man.... hence it is more than self serving for God to desire worship, it is for the greatest hapiness of the creature. .... but there is something inherently good in God being glorified by mercy and also justice