This issue actually boils down to open source and closed software. Android being open source, allows the Apps to run processes in the background. It actually doesn’t kill the App once the user switches to another App.
So more the RAM, more the ability to accommodate running Apps. More the Apps, better the multi-tasking.
Also, as Android promotes good practices while using Java, it optimizes the code for optimal usage of resources. Good practices include reducing App size, optimum RAM memory usage and junk/garbage removal.
On the other hand iOS does not allow free running of Apps in background, other than specific Apps like music players. Ideally iOS will kill an App in background or freeze its functioning.
Worth pointing here is that freedom to run in background in Android comes at a cost, the ill-coded Apps can cause resource hogging and lead to memory leaks while running in the background. So you got to be careful while installing Apps on Android.