This is a problem / feature of the C ++ compilation model.
The fact is that C ++ compiles only .cpp files, and each of them is independent . This means that when compiling it does not know what this text refers to, it does not know the context. When C ++ sees file methods, the compiler has now scanned hundreds (this is not an exaggeration!) Of headers and saw preliminary descriptions of hundreds of classes. He cannot just figure out which method this method applies to.
Even if another method of organizing compilation can be devised (for example, using a preprocessor somehow), the method you described is the usual and practically the only generally accepted method of organizing source code in C ++. Therefore, any other organization of the code is likely to cause confusion among your colleagues.
In other languages, for example, C #, there is no such peculiarity, because all functions are defined inside the class. There are no problems with compilation, as in the question you specified, because #include (which is essentially a simple textual substitution) is not used to find other classes, but a two-pass and indivisible compilation: the compiler does not “forget” "What he saw in other files.
In others, for example, Javascript, the problem is even wider, because the methods of an object class can be defined anywhere and “appear” in an object at any stage of its life cycle.