To be consistent with the handling of other constructs that support trailing commas. In particular the case of a trailing-comma followed by -> is also seen with lambdas where it does prompt the insertion of a newline.
val whenWithTrailingComma =
when (someEnum) {
A,
B, -> caseBody() // Trailing comma does not prevent the elision of any newlines.
else -> TODO("unhandled")
}
val lambdaWithTrailingComma =
{ a, b, // Trailing comma leads to newline insertion.
->
body()
}