According to the docs, $map should return an array. However, if the input data is an array containing exactly one element, it returns the value returned by the function passed to $map as the second argument.
Reproduction: https://try.jsonata.org/hW13DjVzw
In case the link stops working at some point in the future, here is the inlined version of the reproduction steps:
Data
Jsonata
$map($, function($el) {
{ "a": $el.a + 1 }
})
Expected output
Actual output