Why are federal judges appointed and not elected?

If federal judges were elected, they'd want to be reelected -- so might favor the people who might vote for them. They wouldn't be impartial.