It can help with the commitment aspect to make that commitment with another person. If that isn't an issue for you then this is just distraction. By preference, at least for small things, I'll cheat myself before I'll cheat a stranger.
You’re still only holding yourself accountable, which is harder for some than others. If you don’t have friends to study with, maybe some internet strangers could be a motivational alternative.