I never understand why the heatsink don't attach directly to the case behind the motherboard so as to take the stress away from the motherboard.
Because that would require fixed CPU socket positioning on the motherboard, which would
seriously complicate motherboard design. The socket placement is decided by a combination of physical interference requirements, ease/practicality of trace routing, and practicality. Forcing manufacturers to have the socket in one place (or a small selection of fixed positions) would make motherboards noticeably more expensive. Need to shift the socket 1mm sideways to make for perfectly routed RAM traces? Sorry, the next position is 9mm further. Back to the drawing board. Want high-end PWM, shifting the socket a few mm downwards? Uh-oh, now you'll have to move another X millimeters to hit the next position. And so on. Not to mention that it would break any mounting mechanism that screws in from the back, as well as make rear-mounted m.2 impossible. Even with motherboard trays perforated with hundreds of holes (which would
seriously confuse novice PC builders), you'd still place serious restrictions on both motherboard design and build practicality.