This is worse than that. This is letting them make a photocopy of your license and store it forever in a well-ordered filing cabinet in a locked room you hope no one unauthorized ever finds a way into. Because the government made you do it.
You know that's not a law, right? The ratings system is something movie theaters and movie production companies have all agreed to. Unless there is a specific law in your local jurisdiction, in the US at least, there's no national (or even state, I believe) law that says kids can't see rated R movies
In theory you’d be right - and in fact PornHub itself wants better age verification. This is more if a “this ain’t it, chief” from them. On top of privacy and reliability issues, the Texas one requires them to have a bunch of pseudoscience about porn on their landing page.