OK, basically, the law is influenced by society as a whole, because that is one of the characteristics of law (it needs to be suited to the society we're in, and that's why it changes internationally). This influence that society has on the law comes down to those areas you said - legal, imposed by law, for example, paying taxes; moral, imposed by a person's morals and beliefs, for example, the law against killing was originally purely moral duty; cultural, imposed by culture, for example, removing your shoes before entering a Japanese home; religious, imposed by religious beliefs, for example, attending church because it's what we did when we were little; and statutory, obviously imposed by statute laws, which arise from parliament made laws, and I can't think of any definites of the top of my head. Wow, I feel special. Anyway, so they all influence in different ways - the amount of sway they hold is dependent on the country they're in. (By the way, I'm pretty sure that social duties is meant to be in there, obviously imposed by society, including remaining faithful to your husband or wife.) Like in most countries, moral and social duties are closely linked to the law, and while it is not so high in Australia, religion plays a huge role in developing law overseas. However, Australian law is generally made, and changed to suit the times, through interpreting the social and moral aspects of the society in question. Now people are unable to discriminate (not saying it doesn't happen though) based on race, gender, etc., because the law noticed that society was progressing that way. But that's why our legal duties and the law in general is the way it is - because we're influencing it with our inclusion in society.
Hope that helps.