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 translations the word inferos was rendered as “hell,” but it was understood not to mean the place of the damned. The term actually refers to “those below”—that is, to the dead. It thus signified that he descended to visit the just who died in pre-Christian times and were 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 of departed souls both good and bad. It appears from the parable of Lazarus and the rich man (Lk 16:19-31) that there was a place within sheol where the wicked were punished and another place where the righteous awaiting heaven were comforted. Jesus went to the latter.