Hit objects need to be sorted by initial timestamp. Osu format does not require them to be in order by time and as such, maps exist with unordered notes. Example: https://osu.ppy.sh/beatmapsets/724477#mania/1530525 (towards the end, a handful of notes from the beginning were inserted). Other functions that iterate through the list of notes assume the notes are ordered.