Tin has a lower melting point than lead does. It's not that the tin melts from overheating, just weakens. Warping of the board caused by expansion and contraction is what I suspect causes the joints to fracture by metal fatigue.
The 360 experienced this problem mainly due to inadequate cooling. Microsoft selected two notoriously hot running chips. However, the fans and vents were too small to provide enough air flow. The heat sinks themselves are rather small too. Compound this by people putting their systems into (semi-)enclosed AV centres.
Now, while the 360 experienced this problem more frequently an earlier in its life, the PS3 is not invulnerable. It has a better heatsink & fan, but still poor ventilation. Especially around the power supply. The RROD and YLOD are the same thing.
The problems with the 360 and PS3 were gradually solved by die shrinks which made the chips more efficient. Thus putting out less heat. The 360S has a far better cooling system as it's fan draws cold air from the outside to cool the CPU. Much like a desktop.
It's worth noting that the seventh generation consoles were really the first that needed active air cooling. The Xbox and PS2 just had small case fans. So I suspect there was a lot of experimentation and they didn't get it right the first time. You can't just slap hot desktop grade chips into an enclosed space and call it a day.
As for ROHS, it certainly has been an unmitigated disaster. I get where they come from. Electronics get discarded, and most do not end up being recycled. There's a legitimate concern that lead would seep into the soil and groundwater. Though on the flip side, ROHS is causing electronics to fail prematurely, and it generates even more e-waste in the process. Arguably, that's just as bad for the environment. It's a classic case of regulation that had good intentions at heart but comes with big unforeseen consequences.