The A340 was created because the airlines wanted an aircraft they could cross the atlantic ocean with (They couldn't with their twins because of ETOPS so far). So Airbus upgraded the A330 and added two engines. Because of the four engines, the plane was now allowed to cross the ocean.
However, four engines instead of two increase fuel cost dramatically (I assume). And the A340 is the same size as the A330. The A330 could fly with 2 engines. So why hasn't Airbus built the A340 with three engines instead of four. The fuel cost could have been reduced significantly without loosing the permission to cross the atlantic ocean. For example the MD-11 had three engines and also had permission to cross the ocean.