`#pragma pack(1)` prevents aligning the struct and its members to their required alignment. This can result in code that performs non-aligned reads and writes to integers and pointers, which is problematic on some architectures. It also triggers UBsan — see https://github.com/bitcoin/bitcoin/pull/17156#issuecomment-543123631 and #17510.
Backport of core PR17708.