Someone on IRC linked me to a major manufacturer's product page (I forget which) where they were promoting their shallow depth of field phone camera, and gave loads of example pictures. Some were actually quite good, but I'd say on half of them, it was blindingly obvious that it was faked.
Well, people with DSLRs buy fancy tilt-shift lenses to get the same effect, so someone probably thought "hey, lets emulate that in software!". There are times when it's pretty useful... OK, not many times, but still some, and given the useless junk phone vendors are now putting in they've pretty much run out of ideas elsewhere.
Once the image is formed at the sensor or film surface, it cannot be re-focused.
Of course, one can apply filters to the image data in order to, for example, boost the high-frequency content of the image after that, or smoosh the high frequencies to obtain blur.
The purpose of a tilt-shift lens is to obtain a limited effect, better done with a "view camera", to establish a plane of best focus (in object space) that is focused onto the image plane, by tilting the lens plane with respect to the image plane; view cameras have far more tilt angle and shift displacement than a normal "tilt-shift" lens for an SLR or DSLR.
"Tilt" here means rotating the lens holder about a horizontal axis, and "swing" means rotating about a vertical axis, depending on the exact application, possibly of both.
For example, a typical Ansel Adams photograph would tilt the lens down so that the top of a distant mountain and the brook close to the camera are both in good focus, allowing the less interesting object space between them to go "soft".
"Shift" means displacing the lens axis with respect to the center of the image.
This is useful, for example, when you make the lens and image planes vertical, to avoid convergence of vertical lines in the tall building you are imaging, and shift the lens upwards to reduce the amount of parking lot in the foreground.
For a detailed analysis, look up the "Scheimpflug principle":
https://www.opticsforhire.com/blog/scheimpflug-principle/