Video games are now highly complex productions that often involve hundreds of developers at different locations. When the individual components of a game are brought together, a glitch may not be noticed, or is noticed too late, despite the amount of time taken testing the game.
Another complicating factor is that the games have to function on consoles, and additionally on modern gaming PCs assembled with individual hardware. Although development interfaces like DirectX actually take care of this, it also becomes clear here how well the technology has to work together to give users an optimal experience.
However, glitching often has a practical use for developers as well since the creation of a video game rarely proceeds linearly, developers and especially game testers need to have permanent access to all previous levels and missions after implementing new game content and features. For this reason, they often deliberately leave gaps in the level architecture during development in order to progress more quickly through the game and better test mechanics. By glitching their way through the game, they save time.
If this kind of development glitch is still present in the later game, this can have two main reasons: The glitch was forgotten about, or the developer left it in on purpose.