What seems to have been ignored is that nearly every time a safety car is deployed, some drivers will gain an advantage and some will be penalised. I am 99% certain (can't quite recall at which races) that Lewis gained 15 - 20 points during the season, as a result of safety cars.
The 5 cars weren't allowed past the safety car at first, because Masi was waiting for the marshalls to leave the track. Once Latifi's car was removed, it was safe to let them pass the safety car and there was just enough time to restart the race.
With hindsight, maybe a red flag would have been a better decision, but once the safety car had been deployed, what transpired was probably the next best outcome. (in my opinion)