Because it is unbelievable
All movies/series and especially science fiction/fantasy/horror depend on willing suspension of disbelief from the viewers: You know that what you are watching is an impossible story, because there is no magic, space ships are nearly as advanced and the worst thing you can find in dark basement is a rusty nail, but you keep watching, because the story is more interesting and probable, assuming that you are not too critical.
But authors can push too far and suddenly people start noticing the gaps in your story and replacing one actor with another is.... well, cheesy - it is a big sign saying "what you watching is not probable". It sometimes works ,especially if it is a minor character, sometimes you can cover things up with tons of characterisation (Dumbledore after the first Harry Potter is a good example here). Sometimes the background of the story tells you that such changes are possible, like in the Altered Carbon, where this is the main theme of the show or in the Matrix: Revolutions, where you know that the visible world is just a simulation, but usually this is a risky move.
It is much easier (and safer for the suspension of disbelief) to replace one character with another - viewers might not like the replacement, but at least they won't feel like being taken for idiots who supposed to believe that the new actor and the old one are the same person.
It keeps people on the edge
When you are watching a TV series, you are usually sure that the main characters, no matter the trouble they are in now, will eventually if not win or at least survive (or do some sort of heroic sacrifice in the final episode). Killing one of the main characters puts the viewers on the edge, because suddenly they realize that anyone can die and the trouble the heroes are in are much more serious. Arguably, this was one of the main reasons why Game of Thrones was so popular - characters that you've liked (or liked to hate) were dropping like flies, so viewers were more emotionally invested in the story.
It cuts off the station from the offence committed by the actor
This is a bit of PR/legal stunt: if the actor is accused or committing an offence, keeping his character in the show can bring a backslash towards the show, hence the producers will want to remove the actor, often even before the accusations are proven true in court (just look at Kevin Spacey and "House of cards"). Killing that actor's character might be a loophole allowing the station to cut the ties to the actor without breaking his contract and paying fees: he is not fired, but no longer needed in the story. Replacing the actor with another one for the same character could open a whole can of worms: what if in the end the accused was found innocent? He could take the station to court!
Also,by killing the character, station says "we hate such crime so, so much, that we are completely cutting off from this person".