Going from coarse-grained compute to fine-grained compute. The finer grain you have, the more "composability" and "flexibility" you get.
At some point you become so fine-grain that all you have are just lambdas floating in the cloud. And universal pointers to data floating in the cloud. Wire them up and everything scales automatically.
Back when I was working on this sort of stuff, there was an intermediate development between containers and wasm, that being of library OS like mirage OS, unikernels... Etc. I think wasm has probably better positioning compared to those unikernels.
What do you mean when you say "scaling on the level of a function"?
Do you mean any "plain old" function or a specific REST endpoint like AWS Lambda?
If you could just throw distributed computing resources at any function that is a bottleneck in your code, that would be alien tech.