The clock is unofficial.
The referee keeps the time and decides when the game ends.
That five minutes of extra time in the second half seemed way too much; in the first half, there was a lengthy stoppage for an injured player, yet the first half had the same five minutes stoppage time as the second half, where there was no lengthy stoppage of play. Instead of giving the ref this blank check to add as much time as he wants, WHY DON’T THEY JUST STOP THE CLOCK WHEN THERE IS A PENALTY, INJURY, GOAL, OR BALL-IN-THE-STANDS, and end the game or the half when the standard time expires? Define, by rule, when the clock stops, and stop it. Strip the refs of this arbitrary power to add as much time as they want.