Dining room light comes on when using an outlet
I would alter your thinking.  The light switch and the socket are not "just fine."

Odds are your switch or your socket (or both) somehow have the ground / return wires incorrectly wired.  So either the switch routes the return into the ground when closed or worse.  The plug is likely on the same circuit and completing the circuit for the switch due to the miswiring.  This could be done a number of ways, some which involve the misconnected ground feeding electricity into the plugged in device, returning through the return (or some other odd but similar arrangement).

I'd have an electrician go over the switch, the light, and the socket.  If any of these items were rewired, odds are there was an undetected issue, as they didn't plug something into the socket and test the light in conjunction (and the device seemed to work).