system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do "bugs" or "glitches" happen even when accomplished and successful studios develop a video game?

EDIT: 

Perhaps I should've asked the question differently. 

I totally get that people are imperfect and make mistakes.  I'm more interested in understanding *why* a glitch happens, even when professionals do the coding.  

Is there something that is just inherent in coding that creates glitches? 

Do different parts of the code conflict?  Why is it so challenging to identify those glitches, even for professionals?
gpt
Imagine code like a set of rules.

Lets say that you run a business, and you decide to upgrade your security/employee-management. You put finger print locks on the doors, so your building is more secure, and also so you can see when employees arrive and leave based on when they used the fingerprint lock on the front door. Now things will be so much easier!

A week later, you notice one of your employees has missed every single day of work. You demand an explanation and he swears he was here, and his co-workers attest to that.

So what happened? Well, it's because there is a ***bug*** in your system. He carpools to work, and walks in with is co-worker. His co-worker had been opening the door with the fingerprint lock, and he walks in behind them. 

You failed to take that situation into account when making your rules, and so, your system had more employees in the building than you thought. This is a bug.

___

But no matter, easy solution! Just add a new rule that each employee must open and shut the door individually. Bug fixed!


Another week goes by, and you notice that for one of the employees the numbers don't add up. He entered the building more times than he left. Well that doesn't make sense at all. What happened? 

You look at the security footage and see that on two separate occasions, he opened the door to enter, but before going in he realized he forgot something in his car. He let the door shut, went to his car, and then came into the building. That means the records show that he opened the door from the outside more times than he opened it from the inside, explaining why the numbers don't match.

Your mistake here was assuming that just because an employee opened the door, that they went through it. That oversight caused a bug.

___

As you can imagine, there are a lot more rules in a videogame, and thus the potential for a lot more bugs. A lot of situations that you should have realized would happen, but failed to, creating a bug. And with games the faulty information caused by one bug can cause other bugs, which can cause even more bugs, which can hide where the problem started. And sometimes you get a bug once, can't figure out what you did to cause it, and so you don't know what rules need fixing. You know it's there, you saw it happen, but as hard as you try you can't recreate it. 


**TL;DR** Bugs happen when a programmer fails to account for every possibility.