How the pair is formed
The generator picks two large random primes, multiplies them into a shared modulus, and derives a public exponent (conventionally 65537) plus a matching private exponent from those primes. Both PEM blocks encode that same modulus, which is why the two halves work together. Finding primes is probabilistic and the work grows with key size, so a 4096-bit pair takes noticeably longer to produce than a 2048-bit one.