I'm currently working on a PGN writer and came across a problem in the PGN specification regarding the move number indication. The specification is pretty clear. If there is a comment or annotation before the black move the move number is repeated.
A black move element has a preceding move number indication only in two cases: first, if there is intervening annotation or commentary between the black move and the previous white move; and second, if there is no previous white move in the special case where a game starts from a position where Black is the active player.
But both Arena and cutechess-cli produce PGNs that just give the black move without repeating the move number after a comment.
Well, Win/XBoard is also guilty of such non-compliance with the PGN standard. But actually I consider the format as you show above superior over orthodox PGN, so I have no intention to 'fix' it. The standard was designed based on the assumption that comments would be long sentences of text, and after that having a reminder of the moe number make sense. Engine 'score/depth comments', however, are sufficiently short to not cause any confusion, and repeating the move number would just create an annoying distance between the moves, and bloat the file.
So I think it is good to make an exception for these score-depth comments, and just consider them an extension of the standard, different from normal comments. Which just happen to be disguised as comments to enhance backward compatability. As several GUIs all do this, it has become sort of a de-facto standard.
The rationale behind the Black move number display is related to the need for human readability of the move text items. Obviously, importing programs should use move number items only for internal verification and consistency checking.
At the time more than two decades ago, there was a reason behind the definition of the export format -- the idea that a given game have exactly one canonical external ASCII representation. This would make it easy to compare games for equality by use of simple string comparison, something which could be done quickly by the hardware of the day.
Well, there are better ways to do this. I really should issue a new PGN Standard which dumps the whole export business. It's on the to-do list.
Personally i like more the later form, without move numbers before black moves. Reading those numbers it's confusing, to me, because without it you can find easly the white/black move pair and the pgn looks clearest. If you are writing a pgn editor, maybe you must consider to add an option for this detail.
I also like the format without the black move number more. For import it doesn't matter. I accept here both, I don't even rely on move numbers before white moves. I just wanted to export compliant pgn and the standard seemed to give you no choice. But as it turned out that this part of the standard is widely ignored nowadays I decided to ignore it also and skip the black move number if the comment or annotation in front of it is less than 20 characters (which is the case for auto annotated games where the comment gives info about depth, score and used time. I'm not using this %emt format. This would blow up the comment maybe beyond the 20 chars)
If i recall correctly, the original rationale for having an explicit Black move number indication following anything other than a White move came from the heritage of printed chess. The idea was to assist a human reader with a gentle reminder of the current full move number.