Why is tissue typing necessary before a kidney transplant?

Why is tissue typing necessary before a kidney transplant?