The APU may not be needed for flight but they are needed to start the other four engines and provide air circulation In the cabin
As I recall, on a B747-400 only one APU needs to be operational to start an engine when ground power is not available. Once a main engine generator comes on line, the Generator Line Contactors automatically reconfigure to balance the electrical load until all four engines are running and all four generators are powering their respective electrical buses. The APU continues to run until it is shut down, but it is dropped from the electrical bus when the fourth generator is brought on-line when its GLC closes.
The reason the B747-400 has two APU is due to the large electrical power requirements. (It also has two External Power (EP) receptacles for ground power needs.) The Bus Power Control Unit (BPCU) coordinates opening and closing of the EP/APU/GEN line contactors with the Generator Control Units (GCU). This is done automatically as the various power sources become available or are shut down.