If you look at the $map documentation, you will see it
returns an array with the applied results
By doing
you explicitly ask to $set history.status to an array. So it is totally normal that
Most likely you do not $set/$map the appropriate field. But since your sample input document is not formatted correctly we are not to cut-n-paste it to experiment.