They’re bored. They get their homework done, and have the time to kill. Nothing else in their lives is as interesting as what they find on the Internet.
If you want children or adults to spend their time on computers more productively, then give them productive things to do. When left to their own devices, they’re going to find something to do that parents or teachers don’t appreciate.
The problem is that we’re not challenging them.
As access to devices has spread, children in poorer families are spending considerably more time using them for purposes other than for education.