Generally Kafka takes advantage of the OS page cache and the fact that its data is sequential. The reason you can back Kafka effectively with spinning disks is because Kafka is just an immutable log.
OTOH you won't always have sequential access so services that store data in memory cover some of those other cases (eg a KV store like Redis).
OTOH you won't always have sequential access so services that store data in memory cover some of those other cases (eg a KV store like Redis).