I just found the strangest bug and I can’t understand how or why the bug exists

I can’t even fix it because everything is perfectly fine in the code