There have been many philosophers and pundits who have mocked the idea that morality can be legislated. And, in certain ways, some of them have been right. Morality and holiness - real morality; good and wholesome morality, godliness and biblical spirituality must come forth from the inside of an individual as the result of the regenerating influence of the Holy Spirit of God. Yet, in a society, the morality, immorality or amorality of a group of people can most definitely be controlled and influenced by the presence and enforcement of moral laws. In other words, rules don't make men moral, but the absence of rules can most definitely promote a distinct lack of morality (1st Timothy 1:9 - 11).
Judah's king Asa demanded morality from his nation (2nd Chronicles 14:4). And, mainly because of the example that he set, and due to the power of God as an influence upon the hearts of the men of Judah, the morality of the nation was indeed relatively commendable for a little while. The real test of the direction of their heart came in the form of a 1,000,000 man army of Ethiopians which came up against Asa and the Jews (2nd Chronicles 14:9). And, despite the unfair odds, Asa was a winner in this case just as his father had been.