What are the risks associated with, for e.g., plugging this device into a 2-prong extension cord which effectively bypasses the grounding plug?
Firstly, you are not bypassing the ground connection - you are disconnecting it. Bypassing suggests wiring around something, such as "bypassing a fuse with a piece of wire".
Next, consider why we ground appliances in the first place. It is to prevent metallic or conducting cases or enclosures having dangerous voltage levels on them should an internal live wire touch the case. With adequate grounding a large fault current will flow, the fuse will blow or breaker trip and the device will be disconnected from mains.
Without the ground connection the device will remain live and pose a potentially lethal shock hazard to anyone who touches it.

simulate this circuit – Schematic created using CircuitLab
Figure 1. Illustration from How does ground mains work? where this topic is explained.
... imagine a device that comes with a 3-prong (grounded) AC plug.
I'm imagining. In general, if a ground is not required a two-core flex would be supplied and, depending on country, a 2-pin plug fitted. (UK, for example, requires 3-pin connectors on all devices as the earth pin is required to open the socket shutters.)
I'm also interested in device risks. E.g., cases of electrical design where a device would not operate, would operate sub-optimally ...
Some devices may require grounding for noise immunity. For example, audio, TV or computer grounds and internal shields. If the design calls for it then leaving it out may result in interference. It is possible to design isolated but shielded systems - portable devices such as phones.
... or with a shorter lifespan that if it were grounded.
I can't think of any.