Why most particle accelerators used vacuum diodes instead of transistors?
The correlation of MV (or MeV) in HERMES III (High Energy Radiaton Megavolt Electron Source) to diodes or transistors is not appropriate.
The use of diode in the HERMES III Diode implies an anode and cathode, but it does not imply scale.  Helps to understand what is happening, but has led to your confusion.
From History of HERMES III Diode to Z-Pinch Breakthrough and Beyond by Thomas Sanford.


Estimates indicated that HERMES III (Fig. 9) needed to produce a ~20-MeV electron beam at the target on the order of ~700-kA in ~20 ns to produce the desired radiation dose rate of ~5 Trad/s over a useful area of 500 cm2.  These electrical and radiation parameters became the HERMES III design goals.

That's 20,000,000 V at 700,000 A for 20ns.
An artists rendition of the Hermes III (Referenced Fig 9).  Notice the two people in front of the model.