Why? Independent invention of the domain name system, and the URL-path system, at different times by different people.
URL-inventors did not think it important enough to break the already-established convention for domain names to acheive hierarchical ordering consistency. With hindsight, nearly 20 years later, it might seem that it would have been worth the nonstandard novelty, but I still wouldn't be so sure.
Consistency with telnet and email was very important for early URL comprehension and adoption among technical folk. And, the reversal-of-ordering corresponds with an important threshold in URL-resolution, from one system (network-layer and owned-domains in a collaborative framework) to another (a single hostname's internal organization, usually under a unified authority). That signification can be helpful even if it's hard to explain why. (The same goes for seemingly arbitrary, path-dependent choices in natural language grammars that nonetheless dominate logically-designed synthetic languages.)
It's easy enough for specialized applications to adopt a reversed form; junklight mentions the 'SURT' form used by my project, Heritrix, which reorders a URI internally for certain scoping/sorting/policy-decision purposes as:
http://(com,example,www,)/path/to/the/resource
(joshu's proposed move of the port/protocol to 'between' the host and path also has a strong puff of logic about it. I think Google, in their BigTable URI-keys, tends to reverse domain-segments and put the protocol/port later.)