If he stays healthy it's a worthy deal. The risk is that he has injury risks from his days with Carolina but he's been a model of health since he's come to SF.
As long as they are paying Purdy peanuts, they can continue to sign these deals. They are running into an issue where Deebo and Aiyuk both want new deals.