Animal testing is not necessary but it is only evil. There are other methods that can be applied without harming animals like testing on synthetic cells. The firms do not use them generally only because of their costs and people's biased trust on animal testing.
Why? This is like saying that you owe more support to a blood relation then a non-blood relation. In some situations a non-blood relation may be more important to you than a blood relation.