This varies. The lawyers for risk-adverse companies will make sure they follow the licenses. There are auditing tools to make sure you're not pulling in code you shouldn't. An example is Google's go-licenses command [1].
But you can be sure that even the risk-adverse companies are going to go by what the license says, rather than "community norms."
Other companies are more careless.
It’s a fair point that ai training makes enforcing licences more difficult than other situations. My point is that licence issues like this this aren’t really a technology issue it’s a company greed/legal issue because it’s always been the case.