Maybe it is trying to sharpen (and wear down) its teeth. Rodents need to frequently sharpen the incisors so that there is less enamel at the back of the teeth. This makes the teeth grow in the familiar acr. Without this the teeth will grow all sorts of funny shapes and need to be continually clipped. They have even been known to grow up out of the mouth and pressurise the top of the head (no kidding) and on the rare occasion killed the animal.
Captive hamsters have a pretty easy live and don't need to use their teeth much to gather their food. Perhaps your one has found that the bars make an ideal sharpening tool. Then again, it could be that it want to make his bedroom bigger but that's another story.
One solution is to somehow fix glass to the inside where the wires are, only to the hight needed. Do not use perspex as they will eat this when they get a start, and will impact in their stomach.