Revelation 12:7 states that there was a war in heaven - the angles against the dragon and his angels.

How can this be - if Heaven is perfect?