Latency of instructions, number of ALUs and FPUs and available special functions differ from micro architecture to micro architecture. This makes the compiler behave differently in instruction selection when you select different micro architectures.
With llvm-mca you can check how each micro architecture will behave differently for the same machine code: https://llvm.org/docs/CommandGuide/llvm-mca.html