Thieves don't care about locks, so doors are pointless.

Thieves very much do care about doors and locks, because they are a physical barrier that must be bypassed, and doing so is illegal.

Software licenses aren't, AI companies can just take your GPL code and spit it back out into non-GPL codebases and there's no way for you to even find out it happened, much less do anything about it, and the law won't help you either.