Why did Christ visit hell after his death?
He didn’t, if you mean by hell the place of the damned. There would have been no purpose in his going there.
The Apostles’ Creed contains this line in Latin: descendit ad inferos. In older English the word inferos was rendered as “hell,” but it was understood not to mean the place of the damned. It meant the temporary state where the just who died in pre-Christian times were kept, waiting for heaven to be opened to them. This place is commonly called the Limbo of the Fathers.
Jesus referred to this place when he said, “As Jonah was in the whale’s belly for three days and three nights, so shall the Son of Man be in the heart of the Earth three days and three nights” (Mt 12:40). The expression “heart of the Earth” doesn’t mean the grave, but the underworld, what the Jews called Sheol, which was thought to be located at the center of the Earth. Sheol wasn’t a place of the damned, but a place where departed souls wandered.
Peter also refers to the Limbo of the Fathers: “It was in his spirit that he went and preached to the spirits who lay in prison” (1 Pt 3:19).