Aside from habit alone, such as how scrollbars are customarily at the right, this phenomenon may result from psychological or even neurological factors.
Psychologically, the side of your dominant hand is where you prefer to keep things you see as dangerous or more difficult to control. This is why a male and female couple usually walk with the male at the right. The male's job is to protect the couple from outside intruders, for which the male needs his good hand free and facing the outside world. The male's left hand is on the more trustworthy, less dangerous side -- by his female partner.
Neurologically, the left visual field (left of the visual fixation point) is processed directly by the right cerebral hemisphere, and vice versa. In normal mammals, the two hemispheres share data efficiently. For some individuals (particularly "split-brain patients"), this sharing may be more or less interrupted, in which case it would be better to keep the logical information in the right visual field so that the left cerebral hemisphere can process the data effectively. After all, the left cerebral hemisphere is made to process serialised data, such as source code.