Until iOS 4, the iPhone stored photos in a seemingly random fashion within any number of folders inside the DCIM folder — a quick check on my old iPhone with iOS 3.1.3 shows two folders, called 100APPLE and 999APPLE, that both contain photos. iPhones with several hundred photos apparently had several such folders, numbered 100APPLE, 101APPLE and so on.
Presumably there was some logic behind the way in which photos were allocated to folders, but it certainly wasn’t obvious — there weren’t organised by date or name, for example.
With iOS 4, however, this photo organisation has changed and there’s now just one folder within the DCIM folder — called 800AAAAA on my iPhone 3GS. This contains all photos and videos, and there doesn’t appear to be a limit on its size. I have no idea why Apple made this change, other than this system makes far more sense than the system it used previously.
For anyone who synchronises photos using iTunes, this organisational change won’t make a bit of difference. If you’re trying to find a particular photo with an iPhone mounted as an external drive though, it does make things much easier.
Apple hasn’t made a similar change to the way iOS 4 stores music, though — the iTunes_Control folder still contains a succession of folders named F00, F01, and so on, each containing tracks renamed according to some mysterious four-letter convention (ARJP.mp3 is the first track in the first folder on my iPhone 3GS).