Why (?:\z|\n) and not just \z when \z is 'up to and including \n'
Not quite, \z only ever matches at the very end of the string, whereas \Z also matches before the newline at the end of the string, and the meaning of $ is changed by the /m modifier to match before every newline or at the end of the string. When I want to express "match up to the end of this line", I sometimes prefer (?:\z|\n) over $+/m because the former explicitly consumes the \n.
Why \h*\n* and not \s*
Because /\s*/ would also match e.g. \t\n\t, which causes a following /^.../ to no longer match, since /\s*/ consumed the \t at the beginning of the line.
Update: Regarding the first point:
$ perl -MData::Dump -e 'dd split /($)/m, "x\ny\nz"'
("x", "", "\ny", "", "\nz")
$ perl -MData::Dump -e 'dd split /(\z|\n)/m, "x\ny\nz"'
("x", "\n", "y", "\n", "z")