Cognitive dissonance, the ability to compartmentalise, the distance we have created between food and life, the justifications we apply..
I used to raise mice, to feed to my snakes, I couldn't justify keeping snakes and then feeding them on commercially farmed mice that life a short horrid life and a pretty brutal and not very quick death.
My mice had a lovely life, for as long as it lasted - space to run around, toys, food, the ability to socialise or not, as necessary...
I had to have a criteria, beyond 'which size do my snakes need', to cull out the feeders and keep breeders.
So I started with temperament - easy to handle mice stayed, bitey mice went.
I ended up very quickly with a lot of very easy, friendly mice. So now I needed a new criteria... pretty colours/coats.
From three trios of fairly boring short coated brown/white/gingery mice, I ended up with hundreds of coat and colour combinations.
My snakes also grew up and stopped needing pinkies and fuzzies who are not yet old enough to have developed full colours/temperaments, so selecting became even harder.
Eventually I was having to cull mice that were friendly, attractive, handleable, and that I had known a (relatively!) long time.
I couldn't do it any more, I stopped keeping snakes!
I started out able to compartmentalise 'these mice are snake food' and 'these mice are breeders'. But because I had to do the killing myself (C02 chamber), I soon found it increasingly difficult to do that.
People are a long way removed from the killing of animals in most cases, and it is easy to not think about it when thats the case. If we all had to kill what we ate, far fewer meals would contain meat, and we'd make much better use of what we did kill.
Moving away from animals - we make a BIG deal about celebrating soldiers, the military are in some cases a step away from sainthood - but these are people we legitimately send out to kill other people, for the simple reason that 'they're on the other side', and we do not typically refer to them as sociopaths or psychopaths - not if they're on 'our team' anyway!
Some places still kill people as a punishment and deterrant for crime - we live in a world where offing Grandma who is begging to be released from a slow torturous death is a crime, but giving that same overdose to a Death Row inmate is A-Ok...
Because we've built rules and structures and justifications for it.
I think this is really what makes us human, the ability to say 'you', you're a pet, a family member, you live and the other being over there is tasty so they die' or 'you are a murderer, you killed someone, but you, you're a hero, you killed loads of people'...