There was 6 years in between those two events, and by all accounts CentOS got much better post-acquisition.
There is no "just" here. Originally it was considered a good idea, and (years) later they changed their minds.
Over the years I became aware that the acquire-extinguish pattern was definitely not just a coincidence, specifically i remember disney bought up some 'IP' just to litigate against some adjacently-related online fan game in the UK in order to shut it down and 'acquire' its captives, over to a similar product they already owned. Sorry I looked for the exact reference but cant find. There are countless other stories if you look though.
This all came full circle when I was 'enlightening' a young relative who had just finished business school, or rather she 'learned' me. Turns out this acquire/extinguish game is like a whole 100-level course in <pick-your-business-school-of-america>. Who knew.
I don't think RHEL/IBM cares about the small losses on CentOS/Rocky/Alma/etc what they found was hurting them was companies like Oracle