User blog comment:RottenBlock/System 3 Compilation, Part 5/@comment-44256294-20200122141129

My guess is the mask is just to force alignment to 8px columns. Note that (x & 0xFFF8) essentialy rounds down to the nearest multiple of 8.

Another thing that comes to mind is the VSP image format. It is a planar format with color data arranged into 8px columns. Apparently the reason for this was to optimize for the PC-98's graphics hardware. Makes me think that the whole 8px columns thing is just a performance hack for PC-98.