Myrrh and aloes were both used in embalming. The quantities in the text suggest that use rather than the smaller amounts needed for therapeutic use.
Given that Yeshu'a was supposed to have been from Galilee, embalming the body to be taken home for burial, or to preserve it until family members could reach Jerusalem for the ceremony, would be quite sensible.