- Avoids string typos (by making the compiler check).
- Makes it easier to grep for handling/generation of a certain message type.
- Refer directly to documentation by following the symbol in IDE or doxygen.
- Make sure we have an overview of all handled/emitted messages, for functionality like #6589. @harding I've used your descriptions of the message types, hope you don't mind :)
Edit: sendheaders is not yet documented in the developer docs, this is tracked here: https://github.com/bitcoin-dot-org/bitcoin.org/issues/1153