This was discussed extensively over the last few years.
Disclaimer: lengthy mansplaning post follows for the one or two slashdotters interested but who haven't followed this long-running controversy.
Until a few years ago, RH had a public git repository of their rpm spec files, and probably also their patch sets (can't quite remember). Fairly abruptly they shut down that public repository saying that the repo and folks using it to build RHEL clones didn't provide anything of value to the community (really passive aggressive). This caught a lot of people by surprise and it really was a poke in the eye of the community.
But going back even further, Red Hat's support contracts have always caused heartburn for free software supporters, particularly with regards to the GPL. A RH support contract grants access to SRPM files for the entire distro to their customers, along with of course the actual RPMS. But the wording of the support contract says you cannot use those files on non-supported installations. Meaning they don't want you to pay for one server and then use the downloaded files to update your whole cluster, even though the source code license, particularly in the case of the GPL, explicitly grants such permission. Many free software advocates have complained that although RH abides by the GPL technically, they are using contract law to end run around it.
So far as I know, no actual customers of RH have ever been threatened with contract cancellations over this, and to this day Rocky Linux and Oracle both use these RH-downloaded SRPMs to build their distros. I'm not sure to what extend RH actively pursues the accounts used to download by Rocky and Oracle.
RH's defense is that the upstream CentOS Stream system is public and free to use by the community to build on. This is what Alma Linux does and it works very well while maintaining compatibility with RHEL. The only downside is it's harder convert an existing install between RHEL and AlmaLinux. Back in the old CentOS days it was easy. I'd bring up a server on CentOS, test it in beta for a few months/year, then before bringing it into production I'd finally roll it over into a supported RHEL instance.