Why does the transplanted lung sometimes fail to work?

Why does the transplanted lung sometimes fail to work?