IANAL and I don’t know anything about law on this subject, but from what I am reading the US tried to forbid websites from showing porn to minors in 1995 with the Communications Decency Act, but it was struck down two years later [1]. It doesn’t seem that these buttons have any legal effect; in fact there’s no such button on the couple well-known porn websites I just tried.
[1]: https://archive.nytimes.com/www.nytimes.com/library/cyber/we...