I mean unless your friend bought the CPU used and got scammed, or they were somehow soldering something above their CPU while building the PC I don’t see how else this could’ve happened outside the factory.
It looks to me like maybe extra solder got squeezed out during the heatspreader or surface mount component soldering process.