I've noticed that if I deploy the same contract on Optimism, Arbitrum, and Polygon, they will all share the same contract address. Also, if I then deploy 3 contracts on Optimism, wait a bit, and then deploy those same three on Arbitrum as well, they will also have the same contract addresses.
Are contract addresses following a certain order? How does each EVM blockchain get the exact same result?