I don't see any reason that they can't make a reasonable guess on battery consumption based on a variety of factors. The CPU is likely to consume a given amount of power based on usage, and it's easy enough to find out which applications used which amount of CPU time. The display probably consumes a known amount of power depending on the number of pixels lit. Same notions with the GPS receiver, GSM radio, etc.

I doubt it's incredibly accurate, but there's no reason it's not a great rule of thumb.

I just had a thought. You're not assuming that it consumed 6% of the entire battery, are you? The Battery Use display is telling you the relative levels of battery use between the applications (and hardware, etc.) that have been running since the phone was unplugged. What they're saying is that the Browser application used relatively little of the battery compared to the GSM radio and the display. I can confirm that if you leave a CPU-hungry application running, it does show up with a significantly higher percentage of battery use in that display.
_________________________
Bitt Faulk