So I was shooting in autofocus with a small aperture (f11) and my camera (Canon RP) gave a very deep depth of field where everything is in focus. I tinkered a bit and switched to manual focus (with everything else stayed the same). And suddenly the DoF was very shallow; the background was blurry. Can someone explain how moving the focus ring in manual focus affects DoF. In manual focus mode, does it now matter what the aperture is anymore for DoF?
Manual or autofocus has no influence over the depth of field. Something else has changed (assuming aperture remained the same), like the focal length (longer zoom, shallow focus) or the distance to the subject (close to the subject: more distance difference between subject and background).
The simple box camera, Kodak Brownie type, is a fixed focus camera. With no focus adjustment, they are pre-focused on a sweet spot focus distance called the hyperfocal distance. Such a setting delivers maximum depth-of-field. The span is about 1 yard (meter) to infinity. You can manually set your camera to the hyperfocal distance if you know the settings. As a rule of thumb, to maximize depth-of-field, set f/16 (aperture) and manually focus at 10 feet (3 meters). Likely, when you observed that the depth-of-field was wide-ranging, your camera was operating at or near the hyperfocal distance. You can consult tables and charts plus you can Google hyperfocal distance. I set my camera at f/16 and set the focus at 10 feet. Better, find the diameter of your lens (iris) setting, Say your lens is a 50mm focal length set the f/16. The working diameter of the iris is about 50 ÷ 16 = 3.3mm. To find the hyperfocal distance (approximately) multiply 3.3 X 1000 = 3300mm, about 3 1/3 yards/meters. Manually set the focus to this distance (about 10 feet) and you will be amazed at the span of the depth-of-field. When you switch to auto mode, the magic setting you accidentally achieved went by by.