Many years ago, electrical was done without ground wires.
Range/ovens need 240V for all the stuff that makes heat, and 120V for the oven light (so you can use readily available bulbs). Because of this, ranges were supplied 120/240V hot-hot-neutral.
When the grounding "fad" took off, the NFPA wanted to mandate 4-wire range and dryer connections: hot-hot-neutral-ground. However, the appliance industry was appalled at the idea that people would have to upgrade in-wall wiring the next time they bought an appliance. It would crush appliance sales! So they pressured for a compromise, where if ground is absent, ranges and dryers could bootleg ground off the neutral wire, so the chassis is 'grounded' to neutral.
It helped their case that most 3-wire connections go back to the main service panel, where neutral and ground are bonded. The failure of the neutral wire would have the effect of electrifying the chassis, but that was reasoned to be "a risk worth taking" since these connections are rarely disturbed.
Even today, all ranges/ovens and dryers can be connected in 3-wire or 4-wire modes, with neutral internally jumpered to ground in 3-wire mode. It's not a good practice.
It was allowed to do this with /2+ground UF cable, which has a bunch of ground wire strands orbiting the conductors. These are bunched up and used as the neutral. Some thought they could do the same with NM cable (nope). Of course some installations have /3-no-ground cable, where the neutral wire is actually white.
In an installation with /2 UF or NM cable, you can redesignate the bare neutral to be ground. Otherwise you can retrofit a ground wire. You cannot retrofit neutral wires.
Now you know the history of 3-wire range connections, you can see why they attached ground to the neutral wire: appliance shop installers think of them as interchangeable, and are trained to use whichever. Installers are certainly not electricians.