The default \fbox draws the four lines of the frame and places the content in one go. Therefore some lines are placed before and some after the content. If the content is a trimmed image then the trimmed part will be printed over the lines placed before. Also, depending on the zoom level the PDF viewer might mix up both. You can't do much about the latter, but if you load the xcolor package than \fbox gets redefined so that the content is placed first and then the lines are drawn, so that they are always shown above it, as it is supposed to be.