This was not too difficult to enforce when access was mostly in person, but it has become difficult now that access is mostly online.
If society agrees that young people below a certain age should not have access to pornography then it is reasonable, even necessary, to try to implement ways to enforce that restriction online.