Why would Jesus at first refuse the comfort of alcohol, and then later not refuse it?
Three considerations: was it alcohol; was it comforting; did he refuse it?
"Someone ran, filled a sponge with wine vinegar, put it on a staff, and offered it to Jesus to drink. 'Now leave him alone. Let's see if Elijah comes to take him down,' he said."
(Mark 15:36, NIV)
"Immediately, one of them ran and got a sponge. He filled it with wine vinegar, put it on a staff, and offered it to Jesus to drink.
(Matthew 27:48, NIV)
Was it alcohol?
In Mark 15:23 and Matthew 27:34, the first occurrence where he was given a drink, the word is "oinos" (Strong G3630, "wine"). Mark has the wine mixed with myrrh, Matthew has the wine mixed with gall. In Mark 15:36 and Matthew 27:48, the second occurrence where he was given a drink, the word is "oxos" (Strong G3690, "the mixture of sour wine or vinegar and water which the Roman soldiers were accustomed to drink). Roman soldiers, not Judeans.
If you still believe he drank alcohol -if the myrrh and gall were placed on the hyssop plant and the hyssop was placed on the reed and the chemical qualities mixed with the "oxos" and created alcohol- I'll go along with that. Let's say it turned into sangria.
Was it comforting?
We have no reason to believe the drink was comforting because the text never says or implies that he drank it or that it was comforting. It was not given to a man in a bar; it was given to a man dying on a cross, from a bully mocking him (Mark 15:36). Luke 26:36 also makes this clear: "And the soldiers also mocked him, coming to him, offering him vinegar."
I'm missing the part that sounds comforting.
Did he refuse it?
In the first occurrence, the text says that he refused the wine ("oinos"). In the second occurrence, the text does not say that he took it; it only says it was given.
The wine sounds like temptation. The "temptation of Christ" and how he refused it can be found in Matthew 4:1-11. He also said to pray to be delivered from it: "and lead us not into temptation" (Matthew 6:13).
"Does this mark something very significant?"
Only if you've had too much to drink.
Is there a relationship between him saying ‘It is finished’ and his decision to drink a bit of alcohol after his work was done?
No. "It is finished" is from John 19:30. In John 19:28, before he said, "It is finished," it reads: "Jesus knew that his mission was now finished and to fulfill scripture, he said, 'I thirst.'" So he knew "it was finished" before the man gave him the drink. The fact that he was "given" the drink after he knew it was finished implies that "it is finished" has nothing to do with the drink, especially since the man was mocking him: "Let us see whether Elijah comes to take him down." (Mark 15:36)
Christ saying he is thirsty/thirsts likely has to do with living water, not vinegar or sour wine. In John 7:37, "If anyone is thirsty, let him come to me and drink." In Revelation 22:1, "And he showed me a pure river of water of life." In Revelation 22:17, "Come. And let him that is athirst come... let him take the water of life freely."
Lastly, concerning "after his work was done," it is commonplace in Christianity to attribute Christ's work being "done" on the cross. I think it's more accurate to say it was done, resurrecting. The reason he had to die was because he had to resurrect. Christ made seven statements on the cross. His last statement was: "Father, into your hands, I commit my spirit" (Luke 23:46). This is a reference to The Holy Spirit. He had to be given The Holy Spirit (Matthew 3:16), it had to "remain on him" (John 1:32), he had to die with The Holy Spirit (Matthew 27:50), he had to resurrect with The Holy Spirit. He gave mortal men with mortal breaths the eternal, resurrecting breath (The Holy Spirit) to ensure their salvation (John 20:22). That's why The Holy Spirit couldn't come until Christ died (John 16:7) -it had to first die and resurrect with him. That was his mission.