There are a couple of pieces to this question. The first is where the image of a spherical bomb with a lit fuse came from, and the second is how that image became entrenched in the visual lexicon of American cartoons, and from there became so ubiquitous that we can all recognize it.
The spherical bomb is in essence a mortar bomb or case shot that was a common type of projectile of artillery in use in the early to late 19th century. Case shot was a hollow cast iron case filled with black powder from a small opening. Artillerists would close the hole with a plug, which held a fuse. Plugs and fuses came in a variety of shapes and types, but a common fuse was the “quick match,” a type of coated cord that burned at a consistent rate. It’s important to point out that artillery fuses were highly unlikely to be a piece of quick match, as the fuses were generally quite complicated to avoid the shell exploding in the barrel, but quick match in various forms as well, and was a precursor to another explosion-based cartoon classic, the electric pump-handle primer.
Simple and somewhat crude, case shot was intended to explode above formations of men at ranges far longer than the even simpler canister or grape shot could reach. In order to have any hope of accuracy, a gunner would have to accurately estimate the range, the projectile’s time to reach that range, and prepare the fuse to burn for exactly that length of time. Once prepared, it would be combined with the plug, screwed or wedged into the case’s opening, and loaded with the rest of the powder. The fuse would ignite when the cannon was discharged. A mortar bomb was more or less the same, but mortars tended to be far larger than most field artillery.
The classic cartoon bomb is a combination of a couple of things; the case, and the fuse. While an artillerist preparing a shot for their cannon wouldn’t ever have a long string of quick match sticking out the top of the case, the difficulty of timing things exactly right could lead to unexploded shells lying or rolling on the battlefield or inside forts with their fuses still lit.
In any event, the combination of spherical iron case and lit, trailing fuse was widely understood in the mid 19th century and would have been recognized even by non-military audiences. A cartoon from 1863 shows Jefferson Davis, the president of the Confederate States of America, staring down at a classic bomb while confronted with Confederate setbacks. The imagery was fairly commonplace in political cartoons, so it’s likely that this is the path by which it made its way into the popular American cartoons of the early to mid 20th century.