It’s a joyous thing when God “visits” us in the sense of caring for us and answering our prayers. But consider how pakad is used in Exodus 32:34: “In the day when I visit, I will visit their sin upon them.” Here it has very negative implications. To “visit” a person’s sins is to punish the person for them. In each of these lines, both positive and negative, pakad refers to the idea of “paying attention to.” When God pays attention to a person, he cares for them. When he pays attention to someone’s prayers, he answers them. But when he pays attention to someone’s sins, he disciplines them.