Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Expected behavior
I guess -size only makes sense as an input option. If so, then the above command should issue an error or a warning.
Actually I think it would be even better to treat -size as a synonim of -resize when used as output option.
Observed behavior
The option is silently ignored and has no effect. The output image has the same size as the input image.
The -size option sets metadata associated with the image. It appears to be an input only option but there is no reason why an image writer couldn't use this value, either now or in the future. For this reason we do not want to report it as an error or warning.
As a general rule, IM processes each element of the command then moves on to the next element. Hence it doesn't know, when it processes "-size", that nothing follows that "-size" could affect.
That situation is even worse in the new IMv7 "magick" command 'pipelined options' where each command is processed as it arrives from a data pipeline (such as a controlling program). Whether future options may use a setting is completely unknown.