The government claims the laws, which come into effect next year, were needed to protect children's mental health.