This is like a 'chicken and egg' question. RPM package manager (similarly other package management programs) is packaged in an RPM package itself and installed. But then how is RPM initially installed? Likewise, if RPM is (forcefully) uninstalled, then how can it be installed back?
The installer ("anaconda" on CentOS) bootstraps the rpm environment by writing out the base files, then does the initial set of installs in a
chroot environment. The
rpm program from the installer exists outside of the install, and so isn't dependent on those files.
If you need to reinstall
rpm then I'd recommend booting the installer into rescue mode and using the
rpm command from that environment with the
--root option to point to the OS you want to fix.
You can "always" extract the RPM contents, e.g., using
rpm2cpio, and put the executables/scripts where they can be used to install packages. Call that a bootstrap process...