Rule Question: penalty on last play

I know a game can't end with a penalty on the defence, but I thought a game could end with a penalty on the offence.

Tonight the Lions took a penalty on an offensive play as time ran out (illegal procedure) and the game didn't end. Instead, they walked back five yards and took one more snap with zero seconds on the clock.

So, was the stadium clock wrong?
Or, should the game have ended right there?
I'm just wondering why the Lions were allowed to repeat the down with no time left.

2 reasons.

The illegal procedure penalty occurs before the snap, so there is no play. Since the last play that was actually run ended with time still on the clock, a play still has to be run.

Also, it's not that the game can't end on a penalty against the defence, but can if it's against the offence. It's that the game can't end on a penalty that is accepted. It's just that usually a penalty against the offence on the last play will be declined, so the game ends.

JFL – Thanks! Beautiful explanation.

Your answer suggests that the stadium clock should have been reset to the time left before the ball was snapped on the illegal procedure play.

The clock would be at whatever time was left when Kabongo moved because that's when the play is dead, and the clock did run down to that point. In this case it was at 0:00. It still means one more play.