Firstly, these are not toys.
Secondly, the fact that the electricity can travel over a certain distance does not mean that it will arc out this distance.
Arcs are caused by a continuous plasma discharge from the heating of a usually non-conductive material such as air by ongoing electrical current flowing through it.
A stun gun produces pulses and not continuous electrical discharge, thus causing sparks and not arcs, as the air is never heated enough to become plasma. For this reason, a stun gun spark will only travel directly to the nearest grounding, in this case between the two test prongs or through an assailant.
I cannot give you a 2 million volt taser as tasers are very different from stun guns and usually no more than 35000 volts.
Correct about continuous arcs, sorry we call usually arcs also the sparks, and my English is not very good, cause i'm not English, so sometimes i just don't find the right terms on-the-fly.
(also, i call them "toys" cause for me are this and not other ..... anyway, be sure, i don't mean that they are toys to give to kids or use for make jokes, i know perfectly what mean manage high voltages ..... never fight with high voltages, you always loose the match

)
But, anyway, a spark of 10 cm lenght, is caused from the dielectric breaking in air, from 10.000 volts or few more or less (dry air and high pressure requires more voltage, humidity and low pressure require lower voltage)
The problem is not that you cannot reach higher voltages, with enough dimensions, as i said the 2 millions volts machine exists ..... but is occupying a room, and sparks are 2 meters long
Take, as example, the image of the taser some posts above, the one that say on the tag "775.000 Volts" ..... LOL ! ..... for the same above reasons, you can't build a pulsed transformer smaller than a certain dimensions, cause all the materials have a dielectric resistance, and you can't overcome it ..... always as example, the smallest 50 KV pulse transformer that i've ever found, industrial made, with vacuum-made impregnation with high insulation resin, is 30mm diameter and 35mm lenght, and the total distance from the two HV out wires is over 60 mm ..... and is materially impossible to build it smaller, cause also that special resin break on higher voltages, with that thickness ..... a 775.000 Volt pulse transformer that don't kill itself after the first spark, need
at least 70/75 cm of lenght, and 45/50 cm of diameter, and the wires needs some other centimeters of highly insulation cable, for keep them away at least 80 cm from
any other wire ..... do you really think they can fit a similar monstruosity inside a pocket size taser ?
Not mentioning that, for a similar voltage level, you need a holder at least 1 meter long, for avoid that the unit just discharge through your own hand (needing the discharge points far at least 70 cm one from the other, if you hold it with your hand at less than this distance, the shorter way for the spark become "passing through your hand" path

)
Other than this, the sparks gap of that unit looks, at sight, around 50 mm far ..... this mean that this is just a 50.000 V unit, or few more, cause each time the spark snap between the two points, the voltage is turned down, so it never can increase over the spark dielectric breaking level.
The only one i made in the past reaching 75.000 Volt (ONLY 75.000), i had to put the transformer assembly in a resin bath on a box long 100mm and large 60, with the points at 80mm far on the long side, and the discharge points at 70mm far, and the electronic and batteries (3 x 9V !!) on another case long 18 cm, mounted at "T" shape, and with its 240 x 100 x 35 mm size, just it was surely NOT pocket size, LOL!
It's easy, for the makers, to stick a tag that say 775.000 Volt on a taser ..... i bet it's much less easy for them to demonstrate me that this value is true
Anyway,
take always a lot of care, with them, also the 35.000 / 45.000 V ones that you find around for "self-defense" ..... in some rare cases, also these units had
lethal end, on weak subjects !!