Laws change morals and ethics over time. They affect each other. Laws change what people think is moral (just look at how many people think it is moral to sell alcohol but immoral to sell cannabis. That of course is changing now as laws are changing).