Quite a few old amplifiers (and radios) back in the day drew power by directly rectifying the household "mains" wiring. This is an inherently unsafe practice.
Most guitars connect the bridge and strings to the ground (shield) wire on the guitar cord, essentially using the player as a "noise shield." In transformer-less amps, the Neutral wire of the mains is often used as the "ground." With a two-prong cord, Neutral and Hot can be switched (which could place the amp's ground on the Hot wire!) In other words, playing a guitar amp without an isolating transformer could be like sticking a fork in a wall outlet.
Isolation transformers limit the amount of current that can be supplied to the amp (and consequently to the guitar player) if any shock hazards arise, and eliminate possible "hot" ground issues.
In addition, we'll install a three-prong cord, so the amp has a proper earth ground. And a fuse, too. The earth ground and fuse help to maintain a sane ground reference, and protection from shorts.
And we'll incorporate the changes on a small "module," so as to change the original as little as possible. If someone is crazy enough to revert to the original setup...they can do that.
This mod works with radios, too. In fact, many of these amps were called "radio tube" amps, or "AC/DC amps"--like their radio counterparts, a transformer-less amp could be plugged directly into a DC or battery power supply without modification. A decently-sized bank of batteries were required (over 100V), but that was once commonplace.