Q:

Why does the Pixhawk have 2 IMUs

I was looking at the Pixhawk specs and noticed that it has 2 different IMUs- Invensense and STM. Is it for redundancy or does it have any other higher purpose?

A:

Generally engineers implement dual, triple or more sensors with the same function for one or more of the following reasons: 

Reliability: the system should be reliable. Several values can be fetched from several sensor. A voter decides the output(final) value. Boing 777 has 6 sensors for each function. 
Safety and critical systems: if one sensor fails, there should be another one which can replace it.
Power consumption: some sensor consume more power because of their higher precision. Using two sensor with different precisions can make a big difference on power consumption. The sensor with high precision is turned on whenever high precision sampling is needed. 
Frequency analysis: if you sample from a sensor at 1200Hz and another external frequency with same value is applied then you will get a dc-offset because of the two frequencies interfering with each other. 

In case of Pixhawk, I think the main reason is frequency analysis. There are strong vibrations during flight. 

A:

This was on rcgroups:

Reply by Rob_Lefebvre on December 31, 2014 at 7:02am 
Here is a brief history:

The APM class boards used the MPU6000 gyro/accel chip.
The Pixhawk was originally designed to use the LSM303D chip, as it was supposed to be better.
Initial prototype testing of Pixhawk boards revealed problems with the LSM chip. To avoid further delays of Pixhawk production, it was
  decided to add the MPU chip back onto the board, so now there would be
  2.
At some point shortly after the MPU was added, the LSM problem was solved, but it was decided to leave both chips on the board anyway, as
  it allows us to take advantage of redundant sensors.
Up until 3.2, the MPU chip was the only one being used. The LSM was basically ignored. If it failed, the code did not care.
Starting with 3.2, we wanted to start taking advantage of the sensor redundancy, so we began using the data from the LSM. Generally
  this is fine, except for cases where the LSM has a problem. Or the MPU
  has a problem. We did not forsee this failure rate until the code was
  released. The problem is, either chip can fail, and the code doesn't
  know which is good and which is bad. It just knows they're different.
  In this early stage, using two sensors does not really offer
  redundancy and increased reliability. It actually doubles our chance
  of having a problem.

