That is in general incorrect. Apps enabled for background app refresh are not running all the time. They can run on a scheduled basis or if they receive an "event" notification. But most of the time they are idle. If by coincidence one has run recently there is a better chance of it being in RAM.
When you switch out of an app it does not stop immediately; it can finish what it is doing before suspending (so updates to its database don't get corrupted). If it is not enabled for background execution it remains idle until you open it again or it receives a notification. It will then start and run briefly to process the notification (e.g, to save the email just received). This is not technically background operation either.
When you shut down the phone normally each app is given a chance to save its work. That's why shutdowns are not instantaneous. This is also why it is generally a bad idea to force-restart iOS, as it can cause data corruption because the most recent apps have not had a chance to save their work.