It all comes down to engines. The newer and more fuel efficient the engine is, the better the aircraft is going to perform. Boeing and Airbus always pump up their marketing with fancy aircraft cabins--rember the piano bars on the 747's?--and the shopping malls on the A380? When it gets down to making money, the airlines will either cram as many seats as they can or charge you a ton of money to get a bit more leg room. The purpose of flying is to get you there fast--it you want to enjoy the journey, take a boat.
The range difference between the A340-500 (at 8500nm) and the B777-200LR (8865) is not different. Airlines will order the aircraft that best fits into their fleets.