The EV1 was a evaluation exercise/hedge against regulation; the impetus was a lunatic assertion in 1990 by the CA gov't: they wanted 10% of cars sold in the state by 2000 to be electric. Nobody outside of Sacramento thought this would be doable, but it was an excuse to do some useful R&D, as well as to demonstrate to lawmakers the difficulties involved.
As for the Prius-the Gen I Toyota Hybrid Synergy Drive cost $380 million in 1990s dollars for R&D. Anybody at GM trying to spend that kind of money on an experimental(!) powertrain for a low-volume(!!) economy(!!!) car would've been fired. At Toyota, Shoichiro Toyoda was supportive of such an idea, despite the limited opportunity for near-term profit; and if you have that last name at that company, nobody's gonna fire you.