My understanding is that they shouldn't have spent that much time in the air (not intended as a guess for the cause). The margin is there for situations where you can't land earlier, not the margin for scheduling the landing. There is margin for expected potential delays, they were in the other margin that should never be used except in true emergencies.

Oh I think I see; so is the question not “why did they land with so little fuel”, but more like “why did it take so long to decide to redirect to a known-safe airport”?

Possibly. Or 'why did your fuel readings deviate from what was actually in the tanks' or 'why did we leave with less fuel than we thought we did' and so on. There are so many variables here speculation is completely pointless. All we know is that something went wrong, that it almost led to a crash and that it involves an airline with a very good record when it comes to things like this.

Low fuel happens, but this is (very) exceptional.

I don't know. As the parent said, I'd be careful with guessing the root cause right now. They should not have been this low even if diverted due to weather.

By asking such a question you understand the need for an investigation