Also not an iOS developer, but I think that apps enter a “suspended” stage when you close them or press the power button to save battery life. If you look at apps’ crash logs, you can see that they are occasionally killed by a system process for using too much CPU or other resources when they’re in the background.
There are definitely constraints on background activity, but I don't know for sure whether that applies to the camera, and I don't know what its precise relation is to the screen being locked