Smoke damage, enough heat to melt the plastic from the keyboard keys, but yet not enough to com bust the mouse, and it clearly wasn't wrapped in flame or on fire itself, just in proximity ot the heat (and given the limited melting, I;d say not in the same room as the fire at all).
A total loss for a home does not mean it burned to ash. Anything not make of metal or glass would be destroyed by smoke and water, and be unusble, even if it wansn't itself burned. A PC, enclosed in an entirely metal and glass case, and far enough away from direct flame as to not self-ignite and suffer only limited exterior melting (radiant, not direct heat), likely as long as it also avoided significant water it would work. Having been on a desk and not under it, and not having a plastic screen like LCDs, yea, not surprised it's working.