Yeah and one ended up easier to develop than the other. Even when we started producing proper batteries they were not good enough for cars (80s, 90s, 2000s), it took a few decade to get good engines, it took a century for proper batteries
Because many hundreds of millions in research money went into doing so. Science and technology are not blind pursuits whereby we stumble across answers handed down by the gods. We progress according to our motivations.
This is the difference between so-called "technological determinism" which is an ignorant quasi-religious shrugging abdication of reason, and "science as agency", which is instrumental reason. It has it's down-sides, but the latter is infinitely preferable to the former, which, perhaps to labour the car-analogy painfully, is like taking your hands off the steering wheel.
Because that's where the progress was. They simply couldn't make progress on batteries at the time.
Making better engines is a question of manufacturing and metallurgy, stuff that is well within scope for the world as it existed 100yr ago. Making better batteries requires a much higher state of technological progress because you first need to understand chemistry at a much greater level and the fairly finicky chemistry involved has a lot of manufacturing progress as a prerequisite.
There's a reason we didn't get economically viable and high enough performance batteries for consumer electronics (say nothing of power tools and cars) until after we developed computer controlled industrial manufacturing processes.
Basically all the stuff you need to build good ICE cars you will need to develop on your way to developing good batteries. They built engines instead of batteries for the same reason the Romans built with stone instead of steel.
That's a descent into circular arguments and post-facto analysis.
The early twentieth century was a golden age of chemistry. We had the technology to do fractional distillation of petrochemicals and synthesise complex organics. To suppose that we could not have punched gigantic breakthroughs in ionic electro-chemistry is blinkered. Motor technology equally so. Sintering, rare-earth alloys, elaborate windings, and complex field analysis was well within the metallurgy and other technologies you describe, without computers.
But there can be no meaningful argument around it if you only hark back to "what was", instead of analysing the interplay between economic motives and progress. We're arguing at cross purposes if you're bringing up "facts" of history, and I'm talking about socio-economic dynamics.
And, more importantly, why?
So we can preserve a comfort that a 100 year journey into fossil fuels was not a colossal human mistake? Rationalising away the narrative that plausible alternative technological pathways existed achieves what exactly?
It's not like can change the past. So what is going on?
> There's a reason we didn't get economically viable and high enough performance batteries for consumer electronics
We didn't get anything. We didn't want them.
I appreciate this philosophy of technology stuff can be disorientating. It is scary stuff. Because if we admit that there are alternatives, that this is not a Panglossian universe and that we've made gigantic errors in the past, that opens up the terrifying possibility that we're making grave errors right now (which I believe we are). The myth of technology as a deterministically unfolding, monotonic mechanism is very comforting in that world.