That tidemark ring is the giveaway. A hole with a brownish ring around it and crumbly edges is the classic signature of water that's been sitting there and dried out, possibly more than once. If it was a fresh leak you'd have soft wet board, a damp smell, staining spreading further out. Dry tidemark plus crumbly edges usually means old damage that's since dried right out. Six years of a washing machine in front of it means nobody would've noticed unless they pulled it out, which you've now done.
Where the water came from is the million dollar question. Could be an old leak from the machine hoses before you owned it, a leak from the pipe behind the wall, condensation off the cold supply pipe, or someone just cut the hole years ago for access and the damage came from something else entirely. The fact that the floor's dry and there's no smell now is a good sign it's not active. What I wouldn't do is patch over it and shove the machine back. Cut the damaged plasterboard out in a neat rectangle back to solid board, you'll need to get right to where the crumbly stuff stops. That lets you look at the timber inside. If it's dark but hard and solid, it's old damage and fine. If you poke it with a screwdriver and it's soft or spongy, there's rot and you'll want to know how far it goes. A cheap moisture meter from any DIY shop takes the guesswork out, test the timber and the surrounding board. The metal box you can see through the hole is probly the back of the socket back box on that wall. Given the damage is right at it, I'd get a spark in to pull the socket face off and check the box and connections for corrosion or past water ingress before you trust it long term. Water and terminals don't mix even if the socket works today.
Once the timber checks out dry and solid, patch the board, skim it, and you're good to put the machine back.