The technique of fixing faulty electronics with a precise smack is known in the trade as an engineer’s knock or percussive maintenance.
In a remote is it most likely that corrosion on the battery terminal is preventing a good connection and the engineer’s knock shifts some of the corrosion so a contact can be made.
Loose electrical connections. It could be batteries, it could be a broken solder joint, or any of a number of similar things. Smacking the device shakes all of those internals, hopefully re-establishing a broken connection in the device. Unfortunately, it also contributes to the creation of more loose electrical connections, so it’s a losing proposition in the end.
There’s aren’t a lot of metals out there that are not affected by corrosion to some degree at least, and batteries as well as the battery contacts inside devices are typically made with cheap materials. Even a very thin layer of corrosion can prevent batteries from making proper contact.
If you smack the remote, the batteries will move around a bit and either make contact with a different, less corroded area of the contacts, or they may even remove the corroded layer if they move relative to the battery contacts.
Keep in mind that with devices like remotes, were talking about minute levels of corrosion. If a remote works on Sunday and stops working on Monday, then it’s obviously juuust at the tipping point between working and not working, so it only takes a tiny improvement in the contact resistance to restore its function.
Latest Answers