I’m sure somebody will eventually develop software to automatically blur the backgrounds of our smartphone photos, but until then, this is basic physics.
The new camera system in the iPhone XS seems to have moved computational photography from the world of parlor tricks to the mainstream.
Update
This blog post from the developer of Halide, a premium camera app for iOS, goes into a lot more detail about all the computation going on in the new cameras.