It wouldn't be impossible to enforce, but like all laws it is impossible to enforce 100%, while they have an effect and provide at least government and ethical support and remedy for those affected.
Also it would allow people to sue YouTube creators who do so, whereas currently there is no recourse because YouTube can just ignore complaints.