Two 45 minutes halves, clock runs up probably for the same reason everyone uses the metric system.......extra time is for injuries/flopping/writhing on the ground as if you have been shot in the nards......out of bounds and other assorted stuff.
When a half is ending, the referee choose the losed time (with substitutions, foul kicks around the area, and other factors) and add it. This is the extra time.