My commute has a lot of trucks driving to and from and when I am stuck in traffic, I count the wheels of them (I don't only or always do this and this is when I'm dead stopped).
Generally DOT laws in the US restrict weight limits to 600 pounds per inch for tires and around 20000 per axle, with 12000 limit on the steer axle (since it only has two tires mostly). This varies state to state, but this is a pretty average limit.
Doing the math, a standard "18-wheeler" tractor-trailer would be allowed to carry 92000 lbs. Anything over 80000 lbs in the US requires a special overweight permit to move (some exceptions). Your average Walmart or Tyson truck will never get anywhere close to that weight, so 5 axles with 18 tires is plenty for them.
For heavier loads, there are trailers with 3 or more axles to increase the weight limit. You can get vehicle gross weights of over 200,000 lbs or even higher (these are often called a "superloads"). That's when you run into monstrosities like this.
Are you asking how the figure 18 wheels came about (which is in your text), or how that design became the main one? For the former, many of the wheels in an 18-wheeler are mounted with two sets of wheels/tires on one axle. From below, with the cab and the trailer, it looks like this:
|-----|
||---||
||---||
||---||
||---||
Which, if you count 'em, gives 18 wheels.
Well I think a big part of this question has to do with the national highway system and how it was federally funded to keep our nuclear weapons mobile. This led to large, good quality roads that are governed by weight per wheel/axel as everyone else has explained, and thus giving rise to 18+ wheelers.