In some states stores are required to scan IDs. I'd be surprised if e.g. Kroger weren't storing that information. All of these porn laws I've read at least ban any storage. As far as I know digital ID standards are also at least designed to allow only sharing "over18" without other identifying information.