It has to work one way around or the other. Values already in the main container take priority over ones in the incoming container. (I'll add that to the docs.)
Do the merge the other way around (i.e. map2.merge(map1)) to get the opposite/desired result.
I thought that map2('val') would change its value to "1" (or map1('val') to "2" if doing map1.merge(map2)). But it's good to know it doesn't work that way. Thanks!