Why does only the right outboard aileron on the A320/340 float up when the aircraft is in the emergency electrical configuration?
EDIT: This answer is specific to the A340; the A320 is somewhat different.



TL;DR

In the emergency electrical configuration, neither of the two remaining flight-control computers can control the right outboard aileron, and it floats up under aerodynamic forces.

Long version

Some background: all Airbus aircraft from the A320 onwards have five flight-control computers, which translate the pilots' control inputs into control-surface movements.

These are divided into two categories:


Three flight-control primary computers (FCPCs, also known as PRIMs, for "primary"):


FCPC 1 (also called PRIM 1, or P1 for short)
FCPC 2 (aka PRIM 2 or P2)
FCPC 3 (aka PRIM 3 or P3)

Two flight-control secondary computers (FCSCs, also known as SECs, for "secondary"):


FCSC 1 (also called SEC 1, or S1 for short)
FCSC 2 (aka SEC 2 or S2)



Not every flight-control computer can control every control surface; the most critical controls (such as the elevators) are connected to four, or even all five, computers, while less critical surfaces only get two, and the least-critical (the individual spoileron panels) are connected to just one computer apiece (as there are six spoileron panels per wing, with each of the five computers controlling at least one panel on each wing, providing a great deal of redundancy).

On the A340, each of the inboard ailerons is connected to four of the five computers (FCPC 1, FCPC 2, FCSC 1, and FCSC 2); by default, the left inboard aileron receives input from FCPC1, falling back on FCPC 2, FCSC 1, and FCSC 2 (in that order), while the right inboard aileron defaults to FCPC 2, with FCPC 1, FCSC 2, and FCSC 1 to fall back on.

However, each of the A340's outboard ailerons is connected to just two computers.  Both outboard ailerons default to FCPC 3; the left outboard aileron has FCSC 1 as a backup, while the right aileron falls back on FCSC 2.

The A340's RAT can only generate a limited amount of electrical power, especially since a considerable amount of its output has to go into maintaining pressure in at least one of the aircraft's hydraulic systems, in order to allow the aircraft to remain controllable; normally, the hydraulic systems are pressurised by engine-or-APU-driven pumps, but, if the aircraft runs out of fuel (one of the very few circumstances that can simultaneously render all engines and the APU inoperative, and the main reason why the RAT exists), only the RAT is left, and it has to provide both electrical and hydraulic power.  As a result, a lot of electrical load-shedding has to take place to reduce the aircraft's electrical demand to something the RAT can handle; as part of this, three (for the A340) of the five flight-control computers are powered off, leaving only FCPC 1 and FCSC 1.  Additionally, due to the limited hydraulic pressure available from the RAT, the A340's outboard ailerons are deactivated to reduce the demands on the aircraft's RAT-pressurised hydraulics.

The overall effects on the A340's four ailerons are:


Left outboard: Not used; however, as FCSC 1 is still available, the aileron does still receive flight-control commands (although all they do is tell it to stay put), which helps to keep it from drifting away from the neutral position.
Left inboard: Operates as normal.
Right inboard: As FCPC 2 is unpowered, falls back to FCPC 1, and continues to operate.
Right outboard: Not used, and, as both of the two computers able to control it (FCPC 3 and FCSC 2) are offline, receives no flight-control input at all; as a result, its position is now solely dependent on the aerodynamic forces on the aileron, which tend to cause it to float upwards from the neutral point.


As explained in @ymb1's answer to an earlier question of mine:


  The manual does not give a direct reason (not unheard of), but in fact there's more than one reason.
  
  
  
  ► As a quick summary, you lose 2/3 of the spoilers and the outer ailerons, and if more unlucky, you lose 5/6 of the spoilers.
  
  [...]
  
  
  In emer elec config, the plane loses 3 of the 5 flight control computers; what remains are P1 and S1 (refer to diagram above).
  The outer ailerons go into an unpowered state to conserve hydraulic fluid/pressure – the right aileron upfloats* like on the A320 (no P3 and S2).
  
  
  [...]
  
  The references (click to view):
  
  
  
  
  
  
  All images are from the A340 FCOM, and color highlights are mine. Do not use for flight.
  
  A330 vs A340
  
  Thanks to @JZYL, note that there are some differences between the A330 and A340, while the A340 would announce MOST SPOILERS being INOP, the A330 would announce HALF SPOILERS (an extra computer remains powered). The same rationale given should apply though.
  
  * This is also confirmed from [this FCTM][6] (smartcockpit.com) of an airline with both the A330 and A340 in its fleet (see PDF page 207):
  
  
    (...) The AP will disengage when the failure occurs but AP 1 can be reengaged on the A333 if the EMER GEN is powered by an EDP. As there is no AP available in this configuration in the A340, the Captain must take control and fly the aircraft manually. The A340 aircraft is out of trim in roll due to right outboard aileron upfloat, caused by no power being available to Prim 3 or Sec 2, and neither pitch trim or rudder trim is available. (...)
  
  
  Note: I haven't found a reason for the different architecture, but ETOPS is a possibility.


(All bolding, italicisation, etc., original to source.  Kudos to @ymb1 for digging up all this information and explaining it to me.)