That's because they are not the same thing.
When you execute the
getCode(...) function, you get the deployed bytecode of a specific address, as the docs says. The bytecode on the blockchain is the result of the execution of the compiled bytecode of your contract, which includes initialization code.
About the contract you provide, which is verified:
Returns the bytecode of the deployed contract.
- Contract Creation Code
This is the
input of the transaction that creates the contract, as you can see here in the
Input Data field. This bytecode includes initialization code and will result in the bytecode deployed on the blockchain.
Let's see an example about a non verified contract.
What you will get is the bytecode of the contract on the blockchain:
Which is not the same as the input of the transaction that creates the contract, which is the
contract creation code.
Probably here is explained better: