The loop inserted in the order its name states. The read-out returned a different order.
The common read: an object keeps things in the order I put them in, so an index built latest-first reads back latest-first
Whether an object keeps insertion order depends on its keys. The loop did what its name says: it sorted by openedAt descending and inserted 7, then 1042, then 310. Object.keys returned those three keys as 7, 310, 1042, which is ascending numeric order and not the order of insertion. The oldest incident is listed above the second-newest one, and the titles print in that same rearranged order.
The rule is one clause of the specification: own-property enumeration emits every key that is an array index first, in ascending numeric order, so a key that looks like an array index is listed by its numeric value when the object is read, not in the order it was written. An id is a string. "7" and "1042" are strings shaped like array indices, and the object treats them as positions rather than as names.
The triage list on the on-call dashboard has been ordered by that function since it shipped. The retro after the missed page had an action item to add a lint rule for unsorted output, and the output was sorted. Nobody checked the read-out, which is the one step where the order changed.

