Parshat Vayechi, Breisheet 50:7-9 lists everyone who went up to C’naan for Yaakov’s funeral:
Yosef went up to bury his father; and with him went up all of Pharaoh’s servants, the elders of this house, and all the elders of the land of Egypt. And all Yosef’s household, his brothers and his father’s household. Only their little ones, their sheep and their cattle did they leave behind in the land of Goshen. With him also went up chariots and horsemen. It was a very imposing camp.
Later, in Breisheet 50:14 we read:
Yosef returned to Egypt, he and his brothers, and all those who went with him, to bury his father, after he had buried his father.
In verses 7-9 and in verse 15, Yaakov’s burial is ascribed mainly to Yosef.
In the Talmud, Sotah 9b we read in the Mishna:
Yosef merited to bury his father and none of his brothers was greater than he. As it is stated (Breisheet 50:7-9): “Yosef went up to bury his father…and up with him went both chariots and horsemen.” Yosef was rewarded measure for measure for his good deed, for who was treated with as much honor as Yosef, that none other than Moshe attended to him?
The Talmud, Sotah 13a asks:
Why was Yosef the central figure in Yaakov’s burial? If Yosef would not have been involved would the brothers not have been involved with it? But we see that they were in fact involved as it says in Breisheet 50:13: “His sons carried him to the land of C’naan and buried him…”
The Talmud answers:
The other brothers said among themselves, “Let Yosef take the leading role in the burial. Our father Yaakov’s honor is better served by royalty than by commoners.”
Rashi points out that Yosef was royalty as he was second in command to Pharaoh.
Yosef later had the honor of having his bones brought over by Moshe, the “gadol,” the most important person at the time of the exodus.
The difference in the two stories is that Yaakov wanted to be buried immediately and therefore he said to Yosef (Breisheet 47:29) “…deal kindly and truthfully with me. Please don’t bury me in Egypt.” He did not want to be buried in Egypt, even for a small amount of time.
Yosef’s bones on the other hand were temporarily buried in Egypt until the exodus.
As Yosef was the second in command to Pharaoh, it made sense for him to be in charge of Yaakov’s funeral. Yosef was able to make sure that the burial would be taken care of immediately and therefore Yaakov left it in Yosef’s hands, rather than in the hands of his brothers.