Why Jesus Christ gave up his spirit before the thieves dies?

Prophecy

As per prophecy commandment, Christ (The separated one) should not stay with the dead - All the days that he separates himself to the Lord he shall not go near a dead body. Not even for his father or for his mother, for brother or sister, if they die, shall he make himself unclean, because his separation to God is on his head. All the days of his separation he is holy to the Lord. And if any man dies very suddenly beside him and he defiles his consecrated head, then he shall shave his head on the day of his cleansing; on the seventh day he shall shave it. On the eighth day he shall bring two turtledoves or two pigeons to the priest to the entrance of the tent of meeting, and the priest shall offer one for a sin offering and the other for a burnt offering, and make atonement for him, because he sinned by reason of the dead body. And he shall consecrate his head that same day and separate himself to the Lord for the days of his separation and bring a male lamb a year old for a guilt offering. But the previous period shall be void, because his separation was defiled - Numbers 6:6-12

Fulfillment

As prophesied, even at the cross Jesus Christ fulfilled every commandments of our heavenly father - After this, Jesus, knowing that all was now finished, said (to fulfill the Scripture), “I thirst.” A jar full of sour wine stood there, so they put a sponge full of the sour wine on a hyssop branch and held it to his mouth. When Jesus had received the sour wine, he said, “It is finished,” and he bowed his head and gave up his spirit. Since it was the day of Preparation, and so that the bodies would not remain on the cross on the Sabbath (for that Sabbath was a high day), the Jews asked Pilate that their legs might be broken and that they might be taken away. So the soldiers came and broke the legs of the first, and of the other who had been crucified with him. But when they came to Jesus and saw that he was already dead, they did not break his legs - John 19:28-33