CDC and Platform Events are really different use cases.
Platform Events are a generalized event-driven, publish/subscribe mechanism. You can publish Platform Events to represent record changes (in Apex triggers that you implement), but that's not all it can do, and that use case isn't provided as out-of-the-box Platform Events functionality.
You can also, for example, use Platform Events to implement logging on incoming requests to your Apex REST services, or any one of a hundred other use cases.
CDC is something a little different, although it has in common with Platform Events that it's event-driven. It's closer, I think, to being a generalized and deepened replacement for certain use cases of the Streaming API. It's more or less narrowly targeted at specific data replication and synchronization use cases:
Receive near-real-time changes of Salesforce records, and synchronize corresponding records in an external data store.
CDC, Platform Events, and the Streaming API all use the same CometD subscription protocol, so they do have a technical underpinning in common.
Best Answer
The change that's depicted in a Change Data Capture event applies to any and all records present in
getRecordIds()
.It's a distinctly different model than with regular Apex triggers, where the sObject's identity is primary. In CDC events, the primary payload is the change data itself, and the header tells you to which records the the change applies.
This behavior is described in Change Event Header Fields: