What is the purpose of ‘checksum’?
The field ‘checksum’ is a 32-bit unsigned value which, when added to the other magic fields (i.e. ‘magic’ and ‘flags’), must have a 32-bit unsigned sum of zero.
dd 0x100000000 - (0xe85250d6 + 0 + (header_end - header_start))
The purpose is to verify that the multiboot header is in fact a multiboot header. The magic number 0xE85250D6
isn't sufficient to verify this because this magic number could appear either by chance or design in non-multiboot executables. For example a program for working with multiboot executables could easily have this magic number somewhere in it.
Its purpose is not to detect errors as it's pointless to only check the multiboot header for corruption. If corruption is a possibility then the entire executable needs to be verified.