Why does an unfocused lens still give a focused view with a longer exposure? For example, I took an out-of-focus photo with a ¹⁄₁₀th second exposure (at f/7.1), but when I change to 10 seconds (at f/22), it seems to be in focus.
Why is this?
You used a smaller aperture (larger f number) which results in a greater depth of field, thus the image was less far out of focus. It has nothing to do with the longer exposure. If you had added a bunch more light so that you could take it at f/22 with a 1/10 second exposure, you would get the same amount in focus as you did with the 10 second exposure at f/22.