That's kind of true, but it isn't the right comparison. The gear hub isn't just a replacement for the derailleur, but also all your gears, and has a simpler axle. The IGH is still a bit more expensive (~$200 vs $80 for a not completely bottom of the line derailleur based system), but it also requires a lot less maintenance to keep working well.