For people who watched for the first time yesterday:
Safety car: comes out when there's an accident, slows down the cars and bunches the field up so an accident can be cleared safely (obviously can't have marshals on track with cars racing). No overtaking allowed. Usually, lapped cars are allowed overtake and build a gap in front of the pack so that when the racing resumes, cars are together in race order.
People (on Twitter etc) complaining about Hamilton losing his advantage to Verstappen are flat out wrong - losing an advantage to a safety car is a normal part of racing, and it's an important part of strategy to have a plan for what to do. It was more or less a no brainer for Hamilton to stay out and keep track position, and a definite no brainer for Verstappen to stop for fresh tyres once Hamilton didn't.
That much was all fine.
As others have said, the problem is in the lapped cars. Usually, they're all allowed to overtake. There is an option for them to be left in situ which I can't remember being used before, but it's there. There is an accepted wish that races shouldn't finish under safety car where possible.
The argument is over whether or not Masi was allowed to only let SOME lapped cars through rather than ALL. There wouldn't have been time to let them all through and restart the race. Personally, I think if what he did is allowed under the rules (rather than just convention), I think it was the best call to allow the race to finish as a race. If it's not allowed under the rules, then obviously it wasn't ok - but what on earth a court of appeal could do I don't know. That will be the discussion now.
However, I do think the dithering wasn't great, and that Masi hasn't been inspiring as a race director. It's time for someone new.
It is an incredibly fitting ending to this season that it ends in controversy and close racing. Anyone saying this sort of controversy is anything new in F1 isn't familiar with the sport.
I do think the result will stand, but that procedure will change in future.