why do we separate them?
We don't.
As long as we can get away with it at least, as it violated DRY, introducing (only partially checked) repetition.
The problem is that C comes from a long line of single-pass compilers, and while C++ bolted lots of things on with templates and return-type-deduction, it didn't quite reverse that fact.
Thus, if you want to use a function before its definition, you have to provide a forward-declaration.
And if you want to use separate compilation for parts of your code, which is generally advisable for shorter compile-times and ability to use libraries (static or not) in other languages, without sources, or compiled with other options, you need some way to tell the compiler what will be there.
Header-files are collections of such forward-declarations, constant-declarations, inline-functions (inline-functions must be defined in every translation unit using them), type-definitions and the like.
Generally, implementation-files include the corresponding hesders first to verify they work and are self-contained.
Admittedly, the module system introduced with C++20 is a new twist and further reduces the need for forward-declarations.