Yes, I agree that's probably the case. For reasons I don't quite know, the maximum aperture will not generally really provide the best sharpness (due to flaws in the optics, to the best of my understanding), so there's usually a sweet spot in the middle.
I've noticed, too, that the camera selects F4 when there's light (there needs to be quite a lot of light, though), and I agree with you that choice was probably not random.