It makes more sense if you lived through the marketing hype.
I'd compare "Java as solution to everything" to the more recent "web scale" and "NoSQL" crazes, but with the backing of a PR firm instead of Internet echo chambers.
They had a limited amount of memory and accessing it was probably fast, comparatively speaking. So it was a better fit for those devices than it is for our modern ones.