As for the first saying, just going to Hajj, Umrah or visiting, man does not change from negative to positive if he does not have a sincere intention to repent and change and to fight the soul. Yes, if he has this intention, God almighty helps him to do so. The one who becomes bad after Hajj or Umrah, he was not good in the first place but he was pretending to be.
Hajj, umrah and visiting are things of worship, obligatory or desirable, and they themselves do not affect the human being by doing them, if he does not have sincerity in the work, such as the prayer that Allah almighty says it forbids from obscenity and evil. We see a lot of People pray, and they commit taboos and this is not a flaw in the saying of Allah Almighty, but because of a defect in man himself. If he was an observer of Allah Almighty, and noting that Allah watches him and that after several hours he will stand in his hands, he will be ashamed to do what Almighty hates.
The second saying is confirmed for the infallibles, peace be upon them, and perhaps it falls to some people who are most loyal to Allah.