When generating the configuration via mdadm --examine --scan (or similar tools), mdadm strives to unambiguously reflect all the array parameters, including the metadata version.
Therefore, the generated line automatically specifies metadata=1.2 (or the metadata version that is actually stored on the disks).