The engine can't run without the flywheel: the crankshaft alone doesn't have enough rotational inertia to get it through the compression stroke. As the engine runs, there has to be quite a substantial amount of torque transmitted back and forth between the crankshaft and flywheel, several times during every revolution. For that to happen, the attachment of the flywheel to the crankshaft has to be very strong, and very rigid. The key is not capable of transmitting anywhere near enough torque to enable the engine to run - it is only there to control the timing between the flywheel and crankshaft, so that the ignition occurs at the right point in the compression cycle. The rather large, very rapidly repeating, torque required to be transferred between flywheel and crankshaft has to be transmitted by a very good, very tight fit between the two. If there is any garbage or burring in between the two parts, or damage to the mating surfaces, the torque can't be transmitted by friction, and the key tries to do the job instead. Of course it fails, immediately.

For one reason or another - probably running loose, due to poor assembly by one of the previous tenants - your old flywheel had become damaged so its internal taper was not a perfect fit on the external taper on the crankshaft. Whenever the engine ran, the flywheel became a sort of rotating slide-hammer, moving rapidly back and forth across the key. The sudden rise in cylinder pressure after ignition during every revolution, caused the crankshaft to twist very violently in the flywheel, and the loose fit between the two allowed movement, fatiguing and shearing the key in perhaps a few hundred repetitions of this violent movement. A few hundred revolutions of a chainsaw engine only takes a very short time, and that is how long your key lasted each time you started the engine.