If accessing the internet is a strong means of achieving whatever goal they're given, they'll try to access the net by any means necessary.
This sounds suspiciously anthropomorphised. An LLM doesn’t know what the net is.
If the training data set has code for breaking out of sandboxes then, given enough tokens, it will try that code.
The LLM doesn’t have a goal. It has a set of probable sequences of words.