What obliges the public to obey the laws? Their sense of morality and ethics?

What obliges the public to obey the laws? Their sense of morality and ethics? Religion? Social acceptance?