I believe there are 2 events that causes fragmentation:
1) When your computer writes to the hard drive while doing 2 or more tasks. Ex: Browsing the web and downloading a file. Your computer is writing the temp internet files as well as downloading a file to a folder. These files become fragmented since the computer does not calculate how much free space each task needs, and writes to the drive as the tasks are performed.
2) When there is not enough continuous free space to write a file. Ex: You are downloading a 10Gb file with 15Gb free space. The 15Gb free space has fragmented files in and around it so the full 10Gb file cannot be written as one whole 10Gb file, therefore, it is broken up in between the free spaces causing fragmented files.
What happens with WinXP is that system restore runs in the background causing fragmented files as you perform other tasks. Other similar backup programs will also do this (Ex: writing to your systems information folder and recycle bin backup folder).