Thomas signed as a 39 year old for $18 million / 2 years with a vesting option for a 3rd year. This was in 2006. He had historically bad defensive and baserunning value, so he had to hit like crazy both years just to break even. He put up 1.5 WAR for 18 million. That's negative value in 2021 dollars. That contract had huge downside the day it was signed.
BJ Ryan was an elite closer in his prime at 30 when he signed. His contract was $47 million / 5 years in 2006 dollars, the largest reliever contract in MLB history. You can say the injuries were bad luck, but this was a very obvious possibility from the moment it was signed, particularly for a reliever.
Both contracts provided huge negative value and were highly possible outcomes from the day they were signed.