I am not sure Shylock changes that much - in a sense one of the main themes in the play is that of penitence, yet Shylock does not develop or change enough to show any contrition. Perfect contrition is necessary in christianity in order to recover love of God and forgiveness.
Shylock will not do so or offer mercy himself at the beginning. The question is why he refuses what seems to be a sensible request. Shylock admits that he does not like Antonio, saying at one point, "I hate him for he is a Christian" (I.iii.42). Also he says Antonio lends money out without charging interest (a christian charitable dictat) and brings down the interest rates .At the trial he says his reason for disliking Antonio is as inexplicable as the reason some people hate cats or gaping pigs or cannot stand the sound of bagpipes. Actually they both hate each other. Antonio spat at Shylock and treated him like a dog in the Rialto, a public area of commercial exchange. When asked, Shylock tells what he will do with Antonio's flesh since, unlike cows or goats, it is useless. He says "To bait fish withal" (III.i.53). In the next famous speech, Shylock tells how Antonio has laughed at his losses and mocked his successes. He holds that Jews have learned to take revenge from the example set by Christians and views himself as the wronged party in the row and considers his actions to be justified vengeance