The primary function takes entropy and converts it into key pairs in different ways. In the case of RSA-2048 it needs to create two random prime numbers of 1024-bits. It will do this roughly as follows. First a string of 1204-bits with the two highest bits and the lowest bit set is (deterministically) derived from the KDF output. This number will be subjected to (possibly randomised) probabilistic primality testing. Randomisation prevents pathological input being passed to the testing function, but all prime testing functions should behave the same: never returning a false negative and statistically highly unlikely to return a false positive. If the number does not test as prime, then it is incremented by 2 and the new number tested and so on. Once we have the first prime we (deterministically) generate a fresh string from the KDF output and repeat to get the second prime. The process will certainly halt at the first prime number greater than the initial string and there is a vanishingly small chance that it will halt before that on a false positive. Although this may be non-deterministic in the intermediate steps, it is overwhelmingly likely to always produce the same two primes. Some processes might only look for primes of a particular form, but the principle still stands.
In the case of elliptic curves, there is not even the chance of a false positive. There is a universal parameter set that consists of a particular curve and a point $G$ on that curve. The primary function converts the seed into an integer $s$ modulo $\ell$ (where $\ell$ is the order of $G$ in the elliptic curve group) in a uniform manner. The primary then computes $sG$ which is a point on the curve and serves as a public key corresponding to the private key $s$. The reduction modulo $\ell$ and the scalar multiplication of $G$ are both deterministic.