I understand that a self-hosting compiler is a compiler which can compile the code of the language that it is written in into different language but I don't understand why we would want to do that. What are the benefits (and drawbacks) of a compiler which is self-hosting?
There's no direct technical benefit for a compiler to be self-hosting. If anything, it makes things more complicated, because you have to have a working compiler before you can compile the compiler — the bootstrapping problem. (Solved either by having another implementation of the same language — often an interpreter — or by keeping around binaries of a previous compiler version.)
Compiler writers often like the language that they're writing a compiler for. This is the primary reason why many compilers are self-hosting.
Having a compiler that compiles itself does have an indirect technical benefit: it's a litmus test. A compiler is a complex program. If the language is comfortable enough to write a program in, that's a sign that it's comfortable enough for a large class of programs. If the compiler can compile itself without bugs, that's a sign that it's in a good enough shape to compile other programs with confidence.
Think about how the first compiler got written, for the first programming language supported by some platform (probably a C compiler). In other words, think about writing a C compiler for a platform where there is no other compiler available for any other language.
Your only option is to write the C compiler in assembly language. But writing an entire compiler in assembly language would be incredibly painful. You'd much rather write the compiler in a high-level language than in assembly (for the same reason you'd rather write pretty much any program in a high-level language).
The first assembly language compilers ("assemblers") were written in raw machine code. Once you got the program "breathing" enough to process statements, you could build a small piece of it using V1 of the assembler. Once the assembler accepted enough of the language to be useful, you used it to build V2 to add more features, and then V3, and so on. Each subsequent development providing more functionality. Since there were no other languages, the first assemblers had to be self-hosting.
Now, once someone wanted to write a new programming language, they did the same thing, only they'd write it in Assembler. Once the minimal language was working, you could add more features, each language Version N compiler being built by a version N-1 compiler.
Alternatively, if there was another high-level language available, the compiler can be written using that. Nicklaus Wirth wrote the first Pascal Compiler in Fortran, a language for which the CDC mainframe has lots of support.
Once enough of the target language is present in the proposed compiler, further development can use the compiler itself. On the other hand, they may find the original language easier to write a compiler using, or there may be resource limitations which means you can't write the compiler in its own language. The Gnu Compiler Collection provides "frontends" that translate a particular language into the symbols that the backend uses, which means any frontend to compile some other language using the GCC toolchain pretty much has to be written using c or c++, depending on what the backend uses.
The advantage to self-hosting is it reduces the number of languages the compiler writers have to know to two: the machine's assembly language (or object code) and the language of the compiler. If the compiler is not-self hosting, then they also need to know a third language: the language the compiler source is written in.
The only disadvantage to self-hosting I can think of is if the computer you're using does not have a compiler for the language you're writing it for. On the other hand, that may be the reason they wrote the compiler in the first place.