In CPU world, the same CPU has different speed setting because of the quality difference caused by manufacturing process. In cars' world the same may apply? Lower quality engines are given a less powerful setting
For the 325i and 323i example I used earlier, both are using the N52B25 2.5L engine. Some people compared the internal parts of the engine and they are identical, so it gotta be something else that set the performance output apart.