Latifi crashed and they had to deploy the safety car five laps before the end of the race. Max pitted and got fresh tires, Lewis didn't because the safety car came out when he had just went past the pit entry. It took them three laps to clean up the mess, so they had two laps to go. The rules say that in case of a safety car, lapped cars must unlap themselves, which means that Verstappen would have been right behind Hamilton and on fresher tires, it was clear that he would overtake Hamilton easily. The race director decided that lapped cars would not unlap themselves, which would have meant that they would have been a buffer between Hamilton and Verstappen, so Lewis would have probably won, because one lap wouldn't have been enough for Verstappen to catch up. Red Bull complained, so the race director reverted his decision and allowed the lapped cars to unlap themselves. However, they restarted the race before the lapped cars caught up with the pack, which is not in the spirit of the rules. But if they had waited for them to catch up, the race would have ended behind the safety car, which they probably wanted to avoid so Red Bull couldn't claim they gifted Lewis the championship. All in all, Latifi crashed at the worst possible time and put the race director in an impossible Position, because no matter his decision, one team would have claimed he cost them the championship