This is because the device is using an isolated, ungrounded switched-mode power supply to convert mains voltage efficiently and using small, cheap and light components. There is a small capacitance (and extremely high resistance), between the primary and secondary windings of the transformer in the SMPS. An SMPS switches at 100s of kHz, and with this virtual capacitor inside the transformer you couple the high frequency switching into a 100kHz+ voltage noise and this would radiate out along the power conductors and your product fails its electromagnetic emissions certification. Now you can't sell it, and this is usually a problem. It might also interfere with other devices like pacemakers or fire alarms or phone signals or whatever, but it's the not being able to sell it that will really upset your boss. Bloody interfering big-state regulators, can't even blast EM radiation in your own customers' homes. So you have to fix it.

To counteract the noise, you attach a (special, you'll see "Y") capacitor between the primary and secondary sides, right next to the transformer. Now that high frequency noise sees an "easy" short-circuit and it is contained in a small loop within the power supply, not leaking out into the outside world. This needs to be much larger than the (very small) transformer capacitance so it dominates that system.

The downside of this is that now you have an appreciable capacitance between the primary and secondary side. In a grounded system, you connect the primary side of that big capacitor to ground and everything is fine. In an ungrounded system, you can only connect it to something referenced to one of the two wires you have: line or neutral. This means that a small current will flow into the capacitor from each side at line frequency (50 or 60Hz) and the secondary side, connected to the case, will float at some appreciable fraction of mains voltage. You, a damp meatsack, prodding the secondary side with your fleshy protruberances, have capacitance as well. So when you touch this case, that's floating at AC voltage around 100-200V (depends where you are in the world) there's a small current that flows between you and the case as well as the charge flows back and forth. This is what you feel via your nerves, which can detect miniscule currents in this range. Because the capacitors linking you to the mains are, in an absolute sense, small (though far larger than the transformer capacitance), the current is limited to a small amount, far under a milliamp. Actually this would still happen without the bigger capacitor, as there's already some capacitance there, but it could only provide an imperceptible current even to the bio-miracle of the human nervous system. So you have to balance EMI reduction (more capacitance better) against this sensation (more capacitance makes it more noticeable and eventually with a really huge capacitance it would be its own safety hazard).

Why a special capacitor? Well, if were to fail to a short between primary and secondary, now your isolated case is not isolated, it's connected directly to the mains supply and there's no earth wire to dump current to and blow the RCD. So if it didn't immediately blow the fuse (and even then, it needs many 10s of amps to do that to the whole circuit if you don't have fused sockets or plugs in your country, and even then it can also set itself and things nearby on fire without blowing a fuse using only an amp or two if you're unlucky) because it's sitting on, say, metal earthed desk, it's now still floating at mains voltage. However, now it won't deliver microamps, it can deliver a lot more though that carbonised previously-a-capacitor-now-a-small-resistor. If you touch it and have a decent connection to ground, instead of the interference with pacemakers, it can become a turbocharged pacemaker, but your heart doesn't work so well at 50/60Hz and may object to this by going on strike. Regulators for some reason think this is a problem, so you use a special safety capacitor called a "Y" or "X" type, depending on exactly how you use it, which is designed to satisfy them that you probably won't discontinue anyone's sinus rhythm or burn down a building (even if they've actually consented by buying your product!)

So, while is this not an intentional effect, it's also an calculated aspect of the power supply design in the absence of an earth wire and is not a sign of a defect or danger. Other than reminding you that the only thing between you and mains voltage is insulation that's carefully specified, regulated and tested to be safe, for some standardised definition of "safe", of course.

You can also see a much stronger version of this effect with a plasma globe (remember them?). The frequency and the voltage is much higher than 50Hz mains, but the principle is the same: the sphere surface is isolated plastic, there's a very small capacitance to the coil. The current flowing in the low pressure gas in the void is what makes the tendrils. With your with your hand on it, you float at very high voltage and can even produce a tiny sub-millimetre, continuous spark to other objects as the small current flows back and forth into this small capacitance. In retrospect, that plasma globe probably has questionable EMI behaviour when doing that!