It is not all wasted. Walk/bike environment would have been better, but EVs solve another problem, they add energy storage to the grid. Norway has excess production from wind, they can store it and sell it to rest of Europe at higher prices. Also, creating demand is important for scale, Norways EV demand played a (somewhat) crucial role in building up battery factories when it was still a nascent industry, help economies of scale.

It may or may not have helped Norway directly, but out of all the Western economies, Norway performed the sacred function of the rich: support the growth of new technologies that will eventually help everyone.