Fashion, it's nothing more than fashion. Hub gears were common until the bike boom, but then "racing" bikes became the thing, and derailleurs. Mountain bikes persuaded people that the needed 21 gears, then 24, then 27 etc etc to the point where even 8 speeds sounds too little. Most bikes are sold to people who don't know anything about bikes, hence the prevalence of derailleurs. I have nothing against derailluers, indeed, I probably have more derailleur bikes than hub geared (at a quick count, it's 8 hub, 11 derailleur), but they're not ideal for everything.