It stems back to 1982 when Germany's final group game was against Austria.
If Austria won or drew then Austria and Algeria would qualify for the knockout, if Germany won but by less than 3 goals, then Austria and Germany would qualify, and if Germany won by MORE than 3 goals, Germany and Algeria would qualify.
Because Algeria's final game was played the day before the Germany/Austria game, both Germany and Austria knew what each result would mean.
What happened was that Germany and Austria pretty much silently agreed (without ACTUALLY agreeing it, of course) to let Germany win by less than 3 goals so that Germany and Austria would both qualify, thereby shafting Algeria.
So the game kicked off, Austria allowed Germany to score in the first few minutes, then both teams kicked the ball around in their own halves for the next 80 minutes......
Germany and Austria both went through.
From then on, FIFA ruled that both of the last group games for each group would be played at the same time, to avoid this happening again.
EDIT: You can read about it here:
https://www.sportskeeda.com/football/world-cup-2018-why-are-final-group-games-played-simultaneously