It's a coding error, because there is no check to prevent further increment, which then corrupts the next byte over.
That's not actually what happens.
What happens is that there's a test for level number for displaying the fruit in the bottom right, there are three if-statements for cases of levels 1-7, level 8-18 and level 19+. From level 19 onwards it always draws the same thing. The notable part here is that on levels 1-7 it draws a variable amount of fruit (up to 7), but from level 8 onwards it always draws the full 7 fruit. The "draw a variable amount of fruit" is important for how the bug works.
The internal level number is always from zero, and what the game does is add 1 to that number, then use that value for the if statement. On level 255, it adds one to this, giving level 256, but since it's only a 1-byte number, this is treated as zero. Then the if-statement, it says "hey zero is less than 8!" so it runs the code for levels 1-7.
So, what does the code for levels 1-7
do? It starts a counter at 1, draws a fruit from the fruit table, increments the counter, and it stops drawing when the counter equals the level number. Since the level number is now
zero however, it counts all the way up from 1 to 255, then loops back to zero, then says "hey zero, right, ok I'll stop now!"
So, instead of a maximum of 7 fruit like it's supposed to, it draws 256 fruit to the screen, but this overflows the part of memory for the fruit and starts overwriting the map.
EDIT: it's actually far more interesting than just saying a value overflowed, which isn't what's going on, since the number of stars that had to align and overlapping edge cases involved here is pretty interesting. If they never did the add-1 trick before the if-statement then it would have been fine, the first level would have been level 0, and the game would seamlessly wrap around to level "0". Alternatively, if the fruit-drawer had used "less than or equal" instead of "equal" to test when to stop this bug would never have appeared in the first place, or it would merely have drawn no fruit on that level.