Does that ever actually happen? I've only heard of it happening to people who forced the AI's hand by including the comments for said code in the prompt.
There's a setting "Suggestions matching public code" that can be set to "Block" that I think is sufficient for most people's usage. But many companies don't want to involve themselves in any sort of liability.
While many software companies get away with an “it’ll be fine” attitude, that is not sufficient for all companies and industries. Sometimes things have to be provably correct.